Obfuscate Token in Debug Mode

Our client prints out the users token in each curl request.
These debug statements than get passed up to our other services
that use the client if on debug mode so we could be printing the
token in log files. We needed to remove that.

Change-Id: I6dd6c0f171f03f6715abd59b26e9f59de5b0bb9b
This commit is contained in:
Michael James Hoppal 2015-08-30 17:25:53 -06:00
parent 5c63c639ce
commit bc38f83eb5
1 changed files with 2 additions and 0 deletions

View File

@ -127,6 +127,8 @@ class HTTPClient(object):
curl = ['curl -i -X %s' % method]
for (key, value) in kwargs['headers'].items():
if key == 'X-Auth-Token':
value = '*****'
header = '-H \'%s: %s\'' % (strutils.safe_decode(key),
strutils.safe_decode(value))
curl.append(header)