From 8fb010e7ae781e94eefe20fe713a98905b031a8f Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 29 Oct 2026 18:10:30 +0100 Subject: fix(core): fail closed when login password is missing Reject login attempts when the submitted password is absent instead of relying on form validation to prevent a missing value from bypassing authentication. Add regression coverage for both incorrect and missing passwords. --- webmentions_ssg/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webmentions_ssg') diff --git a/webmentions_ssg/views.py b/webmentions_ssg/views.py index 23e8406..d411296 100644 --- a/webmentions_ssg/views.py +++ b/webmentions_ssg/views.py @@ -66,7 +66,7 @@ def login() -> ResponseReturnValue: ) password = form.password.data - if user is None or (password is not None and not user.check_password(password)): + if user is None or password is None or not user.check_password(password): flash("Invalid username or password", "danger") return redirect(url_for("root.login")) -- cgit v1.3.1