Skip to content
Snippets Groups Projects
Unverified Commit 4c07dddc authored by Feanil Patel's avatar Feanil Patel Committed by GitHub
Browse files

Merge pull request #21364 from edx/feanil/more_safe_session_fixes

More python 3 fixes in the safe_sessions middleware.
parents b7392d80 c2d76a60
No related merge requests found
......@@ -202,7 +202,7 @@ class SafeCookieData(object):
hash_func = sha256()
for data_item in [self.version, self.session_id, user_id]:
hash_func.update(six.b(six.text_type(data_item)))
hash_func.update('|')
hash_func.update(b'|')
return hash_func.hexdigest()
@staticmethod
......@@ -475,7 +475,7 @@ def _delete_cookie(request, response):
cookie_header = request.META.get('HTTP_COOKIE', '')[:4096]
log.warning(
u"Malformed Cookie Header? First 4K, in Base64: %s",
b64encode(cookie_header)
b64encode(six.b(cookie_header))
)
# Note, there is no request.user attribute at this point.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment