from __future__ import unicode_literals
import webapp2
myconfig_dict = {}
myconfig_dict['webapp2_extras.sessions'] = {
'cookie_name' : 'session_cookie'.encode('ascii'),
'secret_key' : 'my-super-secret-key-somemorearbitarythingstosay'.encode('ascii')
}
Without the ascii encoding of the cookie_name and the secret_key an exception
is raised, when using unicode literals.
HMAC can only handle byte (i.e. ascii) strings as explained here:
http://bugs.python.org/issue5285
Original issue reported on code.google.com by robert.vos on 29 Oct 2012 at 2:08
Original issue reported on code.google.com by
robert.vos
on 29 Oct 2012 at 2:08