Skip to content
Snippets Groups Projects
Unverified Commit 4ba17920 authored by Ayub's avatar Ayub Committed by GitHub
Browse files

Merge pull request #21361 from edx/BOM-87

BOM-87
parents 4c07dddc ea0c6922
Branches
Tags
No related merge requests found
## mako ## mako
<%page expression_filter="h"/> <%page expression_filter="h"/>
<%! <%!
import six
from django.urls import reverse from django.urls import reverse
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
%> %>
...@@ -17,7 +18,7 @@ ${_("Student Support")} ...@@ -17,7 +18,7 @@ ${_("Student Support")}
<h1>${_("Student Support")}</h1> <h1>${_("Student Support")}</h1>
<ul> <ul>
% for url in urls: % for url in urls:
<li><a href="${url["url"]}">${unicode(url["name"])}</a>: ${unicode(url["description"])}</li> <li><a href="${url["url"]}">${six.text_type(url["name"])}</a>: ${six.text_type(url["description"])}</li>
% endfor % endfor
</ul> </ul>
</section> </section>
......
...@@ -160,7 +160,7 @@ class SafeCookieData(object): ...@@ -160,7 +160,7 @@ class SafeCookieData(object):
)) ))
return safe_cookie_data return safe_cookie_data
def __unicode__(self): def __str__(self):
""" """
Returns a string serialization of the safe cookie data. Returns a string serialization of the safe cookie data.
""" """
...@@ -202,7 +202,7 @@ class SafeCookieData(object): ...@@ -202,7 +202,7 @@ class SafeCookieData(object):
hash_func = sha256() hash_func = sha256()
for data_item in [self.version, self.session_id, user_id]: for data_item in [self.version, self.session_id, user_id]:
hash_func.update(six.b(six.text_type(data_item))) hash_func.update(six.b(six.text_type(data_item)))
hash_func.update(b'|') hash_func.update(six.b('|'))
return hash_func.hexdigest() return hash_func.hexdigest()
@staticmethod @staticmethod
...@@ -317,7 +317,6 @@ class SafeSessionMiddleware(SessionMiddleware): ...@@ -317,7 +317,6 @@ class SafeSessionMiddleware(SessionMiddleware):
Step 4. Delete the cookie, if it's marked for deletion. Step 4. Delete the cookie, if it's marked for deletion.
""" """
response = super(SafeSessionMiddleware, self).process_response(request, response) # Step 1 response = super(SafeSessionMiddleware, self).process_response(request, response) # Step 1
if not _is_cookie_marked_for_deletion(request) and _is_cookie_present(response): if not _is_cookie_marked_for_deletion(request) and _is_cookie_present(response):
......
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