From d74aca91c689b54b7b49bbfa7121f458f4caf751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalevi=20Yyp=C3=A4naho?= Date: Mon, 27 Nov 2023 20:35:57 +0200 Subject: Adding csrf to templates. --- routes/question.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'routes/question.py') 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"] -- cgit v1.2.3