Skip to content

Commit 7535a92

Browse files
Don't show the password in the debug log (#24)
1 parent 5e0ade1 commit 7535a92

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

resources/lib/streamz/util.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ def _request(method, url, params=None, form=None, data=None, token=None, profile
143143
:rtype: requests.Response
144144
"""
145145
if form or data:
146-
_LOGGER.debug('Sending %s %s: %s', method, url, form or data)
146+
# Make sure we don't log the password
147+
debug_data = dict()
148+
debug_data.update(form or data)
149+
if 'password' in debug_data:
150+
debug_data['password'] = '**redacted**'
151+
_LOGGER.debug('Sending %s %s: %s', method, url, debug_data)
147152
else:
148153
_LOGGER.debug('Sending %s %s', method, url)
149154

0 commit comments

Comments
 (0)