Improve request data parsing in PageNode class to support '|' delimiter and add handling for additional fields
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user