Fix bug in Python 3 using Session Management middleware.
This commit is contained in:
parent
2ec9cbe334
commit
8a4103edca
1 changed files with 1 additions and 1 deletions
|
@ -12,6 +12,6 @@ class SessionManagementMiddleware(MiddlewareMixin):
|
|||
"""
|
||||
|
||||
def process_response(self, request, response):
|
||||
session_state = sha224(request.session.session_key or django_settings.SECRET_KEY).hexdigest()
|
||||
session_state = sha224((request.session.session_key or django_settings.SECRET_KEY).encode('utf-8')).hexdigest()
|
||||
response.set_cookie('op_browser_state', session_state)
|
||||
return response
|
||||
|
|
Loading…
Reference in a new issue