From 7b9e8ee71d1da0d1d987a795bb688ecebc956b50 Mon Sep 17 00:00:00 2001 From: burnout87 Date: Fri, 16 Aug 2024 19:02:46 +0200 Subject: [PATCH] var renaming --- cdci_data_analysis/flask_app/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdci_data_analysis/flask_app/app.py b/cdci_data_analysis/flask_app/app.py index 0172848c..1a70bdf7 100644 --- a/cdci_data_analysis/flask_app/app.py +++ b/cdci_data_analysis/flask_app/app.py @@ -225,13 +225,13 @@ def remove_nested_keys(D, keys): def sanitize_dict_before_log(dict_to_sanitize): sensitive_keys = ['token'] # Add any other sensitive keys here - allowed_characters = r'[^A-Za-z0-9 ]' + not_allowed_characters = r'[^A-Za-z0-9 ]' replacement_character = '' sanitized_values = {} for key, value in dict_to_sanitize.items(): if key not in sensitive_keys: # value = str(value).replace('\n', '').replace('\r', '') - value = re.sub(allowed_characters, replacement_character, str(value)) + value = re.sub(not_allowed_characters, replacement_character, str(value)) sanitized_values[key] = value return sanitized_values