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/analyse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'routes/analyse.py') diff --git a/routes/analyse.py b/routes/analyse.py index 70d852b..3b59ae7 100644 --- a/routes/analyse.py +++ b/routes/analyse.py @@ -94,7 +94,8 @@ def analyse(): @app.route("/set/compare",methods=["POST"]) def set_compare(): - csrf_check("/#analyse") + if csrf_check(): + return redirect("/#analyse") session["anal_user1"] = request.form["user1"] session["anal_user2"] = request.form["user2"] return redirect("/#analyse") -- cgit v1.2.3