diff options
author | Kalevi Yypänaho <kyypanah@local> | 2023-11-27 20:35:57 +0200 |
---|---|---|
committer | Kalevi Yypänaho <kyypanah@local> | 2023-11-27 20:35:57 +0200 |
commit | d74aca91c689b54b7b49bbfa7121f458f4caf751 (patch) | |
tree | b13f1ffc7d6f5c816ac16147cc9b8703a17c69c7 /routes/question.py | |
parent | d6c73dbde8a35905a8f29caf9b6d088043a5e78f (diff) |
Adding csrf to templates.
Diffstat (limited to 'routes/question.py')
-rw-r--r-- | routes/question.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/question.py b/routes/question.py index de8dc28..42fce8d 100644 --- a/routes/question.py +++ b/routes/question.py @@ -14,7 +14,8 @@ def question(): @app.route("/set/question",methods=["POST"]) def new_question(): - csrf_check("/#create") + if csrf_check(): + return redirect("/#create") try: question = request.form["question"] neg_ans = request.form["neg_ans"] |