Add nosec to instance of sha1

This change adds nosec to the single instance of sha1 usage,
which is only used for log hashing.

Change-Id: Icf9fe6ee7cdbcbbd7f683f1baafdcc93e2429133
This commit is contained in:
Gage Hugo 2018-09-06 17:25:30 -05:00
parent 2cc2b039b7
commit 476d36df33
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ class Session(object):
secure_headers = ('authorization', 'x-auth-token',
'x-subject-token', 'x-service-token')
if header[0].lower() in secure_headers:
token_hasher = hashlib.sha1()
token_hasher = hashlib.sha1() # nosec log hashing
token_hasher.update(header[1].encode('utf-8'))
token_hash = token_hasher.hexdigest()
return (header[0], '{SHA1}%s' % token_hash)