Merge pull request #300 from SuanmoSuanyangTechnology/fix/workflow-code
fix(workflow): switch code input encoding to base64+URL encoding
This commit is contained in:
@@ -2,6 +2,7 @@ import base64
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
import urllib.parse
|
||||||
from string import Template
|
from string import Template
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@@ -101,6 +102,7 @@ class CodeNode(BaseNode):
|
|||||||
code = base64.b64decode(
|
code = base64.b64decode(
|
||||||
self.typed_config.code
|
self.typed_config.code
|
||||||
).decode("utf-8")
|
).decode("utf-8")
|
||||||
|
code = urllib.parse.unquote(code, encoding='utf-8')
|
||||||
|
|
||||||
input_variable_dict = base64.b64encode(
|
input_variable_dict = base64.b64encode(
|
||||||
json.dumps(input_variable_dict).encode("utf-8")
|
json.dumps(input_variable_dict).encode("utf-8")
|
||||||
|
|||||||
Reference in New Issue
Block a user