mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-06 00:11:50 -05:00
fix bug saving extra_data and follow prompts rules
display_extra_vars was not taking a copy of the data before acting on it - this causes a bug where the activity stream will modify the existing object on the model. That leads to new data not being accepted. Also moved the processing of extra_data to prior to the accept or ignore kwargs logic so that we pass the right (post-encryption) form of the variables.
This commit is contained in:
@@ -137,3 +137,9 @@ def encrypt_dict(data, fields):
|
||||
encrypt_fields = set(data.keys()).intersection(fields)
|
||||
for key in encrypt_fields:
|
||||
data[key] = encrypt_value(data[key])
|
||||
|
||||
|
||||
def is_encrypted(value):
|
||||
if not isinstance(value, six.string_types):
|
||||
return False
|
||||
return value.startswith('$encrypted$') and len(value) > len('$encrypted$')
|
||||
|
||||
Reference in New Issue
Block a user