From 1c9be9c14fb48083aaff4715ecd25dfa7b3a7418 Mon Sep 17 00:00:00 2001 From: "John N. Milner" Date: Tue, 2 Jan 2018 18:46:46 -0500 Subject: [PATCH] Remove `encode()` to fix non-ASCII XML hashing Fixes #401 --- onadata/apps/logger/models/instance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onadata/apps/logger/models/instance.py b/onadata/apps/logger/models/instance.py index f12d76f6e..cbc10f178 100644 --- a/onadata/apps/logger/models/instance.py +++ b/onadata/apps/logger/models/instance.py @@ -330,7 +330,7 @@ def get_hash(input_string): :return: The resulting hash. :rtype: str ''' - return sha256(input_string.encode('UTF-8')).hexdigest() + return sha256(input_string).hexdigest() @property def point(self):