aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2023-05-07 10:22:21 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2023-05-07 10:22:21 +0200
commite01f5c44f08bdb0a1c24109ce95becf8e3bfa165 (patch)
tree92433bc00403faab5e30be8be580116225857995
parentchg: [security] Updated Flask (CVE-2023-30861) and markdown-it-py. (diff)
downloadnewspipe-e01f5c44f08bdb0a1c24109ce95becf8e3bfa165.tar.gz
newspipe-e01f5c44f08bdb0a1c24109ce95becf8e3bfa165.tar.bz2
newspipe-e01f5c44f08bdb0a1c24109ce95becf8e3bfa165.zip
fix: [forms] Fixed an issue in Flask-WTF.
-rw-r--r--newspipe/web/views/session_mgmt.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/newspipe/web/views/session_mgmt.py b/newspipe/web/views/session_mgmt.py
index 6aad5833..0e8329e5 100644
--- a/newspipe/web/views/session_mgmt.py
+++ b/newspipe/web/views/session_mgmt.py
@@ -4,6 +4,7 @@ from datetime import datetime
from flask import current_app
from flask import flash
from flask import redirect
+from flask import request
from flask import render_template
from flask import session
from flask import url_for
@@ -79,7 +80,8 @@ def login():
if current_user.is_authenticated:
return redirect(url_for("home"))
form = SigninForm()
- if form.validate_on_submit():
+ # if form.validate_on_submit():
+ if request.method == "POST" and form.validate(): # fixes an issue in flask-wtf
login_user_bundle(form.user)
return form.redirect("home")
return render_template("login.html", form=form)
bgstack15