mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 22:48:02 -03:30
reject runtime extra vars that are strings
This commit is contained in:
parent
102c6940cb
commit
87093ec8af
@ -2234,8 +2234,9 @@ class JobLaunchSerializer(BaseSerializer):
|
||||
except (ValueError, TypeError):
|
||||
try:
|
||||
extra_vars = yaml.safe_load(extra_vars)
|
||||
except (yaml.YAMLError, TypeError, AttributeError):
|
||||
errors['extra_vars'] = 'Must be valid JSON or YAML'
|
||||
assert isinstance(extra_vars, dict)
|
||||
except (yaml.YAMLError, TypeError, AttributeError, AssertionError):
|
||||
errors['extra_vars'] = 'Must be a valid JSON or YAML dictionary'
|
||||
|
||||
if not isinstance(extra_vars, dict):
|
||||
extra_vars = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user