diff options
author | Marjo Murtomäki <mmurtoma@local> | 2023-11-27 20:06:59 +0200 |
---|---|---|
committer | Marjo Murtomäki <mmurtoma@local> | 2023-11-27 20:06:59 +0200 |
commit | d6c73dbde8a35905a8f29caf9b6d088043a5e78f (patch) | |
tree | 3c01dbdc1da03d25bb999c10496c93a9f1ef4fbe /routes/tools.py | |
parent | c618290a4476fd01f46b079e8b95bbc16341cbca (diff) |
Fixing so that the code will run again after adding csrf checks.
Diffstat (limited to 'routes/tools.py')
-rw-r--r-- | routes/tools.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routes/tools.py b/routes/tools.py index eea6a8f..3f831a9 100644 --- a/routes/tools.py +++ b/routes/tools.py @@ -38,9 +38,9 @@ def generate_link(): str+=vocal[randint(0,len(vocal)-1)] return str -def csrf_check( redir ) - if "csrf" not in session - or "csrf" not in request.form - of session["csrf"]!=request.form["csrf"]: +def csrf_check( redir ): + if "csrf" not in session \ + or "csrf" not in request.form \ + or session["csrf"]!=request.form["csrf"]: session["alert"]="Istuntosi katkesi tai pyyntö toiselta sivulta!" return redirect( redir ) |