From 56044f8b028b1019a309084e8550e28ec384c070 Mon Sep 17 00:00:00 2001 From: litterGuy Date: Sat, 23 Nov 2024 08:42:50 +0800 Subject: [PATCH] fix: json parse err when http node send request When the node sends an http request parameter with \n\t\r, the json conversion error ValueError: Invalid control character at: line 1 column 8363 (char 8362) --- api/core/workflow/nodes/http_request/executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/workflow/nodes/http_request/executor.py b/api/core/workflow/nodes/http_request/executor.py index 80b322b068..22ad2a39f6 100644 --- a/api/core/workflow/nodes/http_request/executor.py +++ b/api/core/workflow/nodes/http_request/executor.py @@ -108,7 +108,7 @@ class Executor: self.content = self.variable_pool.convert_template(data[0].value).text case "json": json_string = self.variable_pool.convert_template(data[0].value).text - json_object = json.loads(json_string) + json_object = json.loads(json_string, strict=False) self.json = json_object # self.json = self._parse_object_contains_variables(json_object) case "binary":