Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2566,10 +2566,13 @@ def action_varexport(self, ids, session=None):
d = json.JSONDecoder()
for var in qry:
val = None
try:
val = d.decode(var.val)
except Exception:
val = var.val
if wwwutils.should_hide_value_for_key(var):
val = '*' * 8
else:
try:
val = d.decode(var.val)
except Exception:
val = var.val
var_dict[var.key] = val

response = make_response(json.dumps(var_dict, sort_keys=True, indent=4))
Expand Down
11 changes: 7 additions & 4 deletions airflow/www_rbac/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2030,10 +2030,13 @@ def action_varexport(self, items):
var_dict = {}
d = json.JSONDecoder()
for var in items:
try:
val = d.decode(var.val)
except Exception:
val = var.val
if wwwutils.should_hide_value_for_key(var):
val = '*' * 8
else:
try:
val = d.decode(var.val)
except Exception:
val = var.val
var_dict[var.key] = val

response = make_response(json.dumps(var_dict, sort_keys=True, indent=4))
Expand Down