Merge remote-tracking branch 'refs/remotes/rodney757/misc'
This commit is contained in:
commit
8cd4f195b8
@ -111,7 +111,7 @@ class CsrfMeddleware(BaseMeddleware):
|
|||||||
httponly=True)
|
httponly=True)
|
||||||
|
|
||||||
# update the Vary header
|
# update the Vary header
|
||||||
response.vary = list(getattr(response, 'vary', None) or []) + ['Cookie']
|
response.vary = (getattr(response, 'vary', None) or []) + ['Cookie']
|
||||||
|
|
||||||
def _make_token(self, request):
|
def _make_token(self, request):
|
||||||
"""Generate a new token to use for CSRF protection."""
|
"""Generate a new token to use for CSRF protection."""
|
||||||
|
@ -59,7 +59,10 @@ def gen_password_hash(raw_pass, extra_salt=None):
|
|||||||
|
|
||||||
|
|
||||||
def check_password(raw_pass, stored_hash, extra_salt=None):
|
def check_password(raw_pass, stored_hash, extra_salt=None):
|
||||||
return auth_tools.bcrypt_check_password(raw_pass, stored_hash, extra_salt)
|
if stored_hash:
|
||||||
|
return auth_tools.bcrypt_check_password(raw_pass,
|
||||||
|
stored_hash, extra_salt)
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def auth():
|
def auth():
|
||||||
|
@ -342,7 +342,7 @@ def delete_openid(request):
|
|||||||
form.openid.errors.append(
|
form.openid.errors.append(
|
||||||
_('That OpenID is not registered to this account.'))
|
_('That OpenID is not registered to this account.'))
|
||||||
|
|
||||||
if not form.errors and not request.session['messages']:
|
if not form.errors and not request.session.get('messages'):
|
||||||
# Okay to continue with deleting openid
|
# Okay to continue with deleting openid
|
||||||
return_to = request.urlgen(
|
return_to = request.urlgen(
|
||||||
'mediagoblin.plugins.openid.finish_delete')
|
'mediagoblin.plugins.openid.finish_delete')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user