Skip to content

Commit

Permalink
sanitize par_dic before logging for gallery and call_back
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Aug 16, 2024
1 parent ca1cbe0 commit 57e3c57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cdci_data_analysis/flask_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,11 @@ def run_analysis():
request_summary = log_run_query_request()

try:
sanitized_request_values = sanitize_dict_before_log(request.values)

logger.info('\033[32m===> dataserver_call_back\033[0m')
logger.info('\033[33m raw request values: %s \033[0m',
dict(request.values))
dict(sanitized_request_values))

query_id = hashlib.sha224(str(request.values).encode()).hexdigest()[:8]

Expand Down Expand Up @@ -532,9 +534,11 @@ def resolve_job_url():

@app.route('/call_back', methods=['POST', 'GET'])
def dataserver_call_back():
sanitized_request_values = sanitize_dict_before_log(request.values)

logger.info('\033[32m===========================> dataserver_call_back\033[0m')

logger.info('\033[33m raw request values: %s \033[0m', dict(request.values))
logger.info('\033[33m raw request values: %s \033[0m', dict(sanitized_request_values))

query_id = hashlib.sha224(str(request.values).encode()).hexdigest()[:8]

Expand Down

0 comments on commit 57e3c57

Please sign in to comment.