web: use sha1 for token generation instead of md5(disabled by FIPS)

fixes: #2291
This commit is contained in:
Yu Ming Zhu 2020-06-16 11:30:46 +00:00 committed by Tomas Kopecek
parent fc4cb3d37e
commit 0a61104280

View file

@ -173,7 +173,7 @@ def _genToken(environ, tstamp=None):
tstamp = _truncTime()
value = user + str(tstamp) + environ['koji.options']['Secret'].value
value = value.encode('utf-8')
return hashlib.md5(value).hexdigest()[-8:]
return hashlib.sha1(value).hexdigest()[-8:]
def _getValidTokens(environ):