Skip to content
Snippets Groups Projects
Commit a6b1357e authored by Julian Rother's avatar Julian Rother
Browse files

Fixed key error problem in csrf_inject

parent ec0ecf1a
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ def csrf_protect(func):
@app.url_defaults
def csrf_inject(endpoint, values):
if endpoint not in csrf_endpoints or not session['_csrf_token']:
if endpoint not in csrf_endpoints or not session.get('_csrf_token'):
return
values['_csrf_token'] = session['_csrf_token']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment