diff options
Diffstat (limited to 'routes/base.py')
-rw-r--r-- | routes/base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/base.py b/routes/base.py index 42d8cdf..2c4b1f2 100644 --- a/routes/base.py +++ b/routes/base.py @@ -1,3 +1,4 @@ +from secrets import token_urlsafe from app import app from flask import render_template,session,request,redirect import db_actions as D @@ -26,7 +27,8 @@ def info(): @app.route("/set/nick",methods=["POST"]) def new_nick(): next = "/#"+request.form["caller"] if "caller" in request.form else "/" - csrf_check(next) + if csrf_check(): + return redirect(next) if "id" in session.keys(): session["alert"]="Sinulla on jo nimimerkki. Käytä sitä." return redirect(next) |