From b97db5aa86cb840378c8538d40ba6a473168dbcf Mon Sep 17 00:00:00 2001 From: Nimisha Asthagiri Date: Mon, 19 Aug 2019 11:51:05 -0400 Subject: [PATCH] Fix encode before calling md4 hash in common/djangoapps/util/memcache.py --- common/djangoapps/util/memcache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/util/memcache.py b/common/djangoapps/util/memcache.py index bca18d51d8..a09d62f440 100644 --- a/common/djangoapps/util/memcache.py +++ b/common/djangoapps/util/memcache.py @@ -17,7 +17,7 @@ def fasthash(string): Hashes `string` into a string representation of a 128-bit digest. """ md4 = hashlib.new("md4") - md4.update(string) + md4.update(string.encode('utf-8')) return md4.hexdigest()