From 2e7adfbee4835f1374dffe7ba49760cfc19fdb0e Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sat, 29 Sep 2018 15:10:19 +0200 Subject: [PATCH] Cast to bytestring in md5 function --- lib/galaxy/web/framework/helpers/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/web/framework/helpers/__init__.py b/lib/galaxy/web/framework/helpers/__init__.py index 12017a66fc6..056fa2d72e3 100644 --- a/lib/galaxy/web/framework/helpers/__init__.py +++ b/lib/galaxy/web/framework/helpers/__init__.py @@ -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()