Skip to content

Commit

Permalink
Don't show the password in the debug log (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarnauts authored Dec 21, 2020
1 parent 5e0ade1 commit 7535a92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resources/lib/streamz/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ def _request(method, url, params=None, form=None, data=None, token=None, profile
:rtype: requests.Response
"""
if form or data:
_LOGGER.debug('Sending %s %s: %s', method, url, form or data)
# Make sure we don't log the password
debug_data = dict()
debug_data.update(form or data)
if 'password' in debug_data:
debug_data['password'] = '**redacted**'
_LOGGER.debug('Sending %s %s: %s', method, url, debug_data)
else:
_LOGGER.debug('Sending %s %s', method, url)

Expand Down

0 comments on commit 7535a92

Please sign in to comment.