diff --git a/DataQualityTester/lib/middleware.py b/DataQualityTester/lib/middleware.py index 61a5f17..ad64130 100644 --- a/DataQualityTester/lib/middleware.py +++ b/DataQualityTester/lib/middleware.py @@ -9,7 +9,7 @@ @app.before_request def csrf_protect(): if request.method == 'POST': - token = session.pop('_csrf_token', None) + token = session.get('_csrf_token', None) if not token or token != request.form.get('_csrf_token'): abort(403)