Skip to content
Snippets Groups Projects
Commit cc70c4ff authored by Ben Adida's avatar Ben Adida
Browse files

removed old pdb's and fixed csrf token setting to consider unicode

parent 206362de
No related branches found
No related tags found
No related merge requests found
...@@ -176,7 +176,7 @@ class DLogProof(LegacyObject): ...@@ -176,7 +176,7 @@ class DLogProof(LegacyObject):
def __init__(self, wrapped_obj): def __init__(self, wrapped_obj):
if isinstance(wrapped_obj, dict): if isinstance(wrapped_obj, dict):
import pdb; pdb.set_trace() raise Exception("problem with dict")
super(DLogProof,self).__init__(wrapped_obj) super(DLogProof,self).__init__(wrapped_obj)
......
...@@ -65,7 +65,6 @@ def start_openid(session, openid_url, trust_root, return_to): ...@@ -65,7 +65,6 @@ def start_openid(session, openid_url, trust_root, return_to):
error = "OpenID discovery error: %s" % (str(e),) error = "OpenID discovery error: %s" % (str(e),)
if error: if error:
import pdb; pdb.set_trace()
raise Exception("error in openid") raise Exception("error in openid")
# Add Simple Registration request information. Some fields # Add Simple Registration request information. Some fields
......
...@@ -95,7 +95,7 @@ def get_user(request): ...@@ -95,7 +95,7 @@ def get_user(request):
# request.session.set_expiry(settings.SESSION_COOKIE_AGE) # request.session.set_expiry(settings.SESSION_COOKIE_AGE)
# set up CSRF protection if needed # set up CSRF protection if needed
if not request.session.has_key('csrf_token') or type(request.session['csrf_token']) != str: if not request.session.has_key('csrf_token') or (type(request.session['csrf_token']) != str and type(request.session['csrf_token']) != unicode):
request.session['csrf_token'] = str(uuid.uuid4()) request.session['csrf_token'] = str(uuid.uuid4())
if request.session.has_key('user'): if request.session.has_key('user'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment