Commit a6b1357e authored by Julian Rother's avatar Julian Rother
Browse files

Fixed key error problem in csrf_inject

parent ec0ecf1a
......@@ -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']
......
Supports Markdown
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