diff MoinMoin/wikiutil.py @ 6128:561b7a9c2bd9

fix wrong digestmod of hmac.new calls stdlib default is md5, but we need sha1. this bug was introduced when removing python_compatibility module usage in changeset 500f68d3e2fd594b2f4ea4a272b828a07d9eac1d.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 01 Nov 2016 17:56:32 +0100
parents 500f68d3e2fd
children
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Mon Oct 31 22:58:54 2016 +0100
+++ b/MoinMoin/wikiutil.py	Tue Nov 01 17:56:32 2016 +0100
@@ -12,7 +12,7 @@
 
 import cgi
 import codecs
-import hmac
+import hmac, hashlib
 import os
 import re
 import time
@@ -2530,7 +2530,7 @@
         hmac_data.append(value)
 
     h = hmac.new(request.cfg.secrets['wikiutil/tickets'],
-                 ''.join(hmac_data))
+                 ''.join(hmac_data), digestmod=hashlib.sha1)
     return "%s.%s" % (tm, h.hexdigest())