Pass bytes to md5_constructor

Fixes login TypeError on koji-web
This commit is contained in:
Mengjing Shi 2019-06-17 20:19:21 +00:00 committed by Mike McLean
parent e73bd368e5
commit 2d88836a4b

View file

@ -167,7 +167,7 @@ def _genToken(environ, tstamp=None):
return ''
if tstamp == None:
tstamp = _truncTime()
return md5_constructor(user + str(tstamp) + environ['koji.options']['Secret'].value).hexdigest()[-8:]
return md5_constructor((user + str(tstamp) + environ['koji.options']['Secret'].value).encode('utf-8')).hexdigest()[-8:]
def _getValidTokens(environ):
tokens = []