Improve request data parsing in PageNode class to support '|' delimiter and add handling for additional fields

This commit is contained in:
2025-09-23 02:42:54 -05:00
parent 19fad61706
commit 9f5ea23eb7

View File

@@ -147,6 +147,9 @@ class PageNode:
try:
data_str = data.decode('utf-8')
if data_str:
if '|' in data_str and '&' not in data_str:
pairs = data_str.split('|')
else:
pairs = data_str.split('&')
for pair in pairs:
if '=' in pair:
@@ -157,6 +160,8 @@ class PageNode:
env[key] = value
elif key == 'action':
env['var_action'] = value
else:
env[f'field_{key}'] = value
except Exception:
self.logger.exception("Error parsing request data")
result = subprocess.run([file_path], stdout=subprocess.PIPE, check=True, env=env) # noqa: S603