Cast to bytestring in md5 function

This commit is contained in:
mvdbeek
2018-09-29 15:28:12 +02:00
parent 565f611389
commit 2e7adfbee4
+3 -2
View File
@@ -13,7 +13,8 @@ from routes import url_for
from galaxy.util import (
hash_util,
unicodify
smart_str,
unicodify,
)
from galaxy.util.json import safe_dumps as dumps # noqa: F401
from .tags import (
@@ -104,7 +105,7 @@ def md5(s):
Return hex encoded md5 hash of string s
"""
m = hash_util.md5()
m.update(s)
m.update(smart_str(s))
return m.hexdigest()