diff options
| author | Dennis Fink | 2026-10-29 18:10:30 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-29 18:10:30 +0100 |
| commit | 8fb010e7ae781e94eefe20fe713a98905b031a8f (patch) | |
| tree | 6005514f814bc79ff8800ea151449fb80483629f /webmentions_ssg/views.py | |
| parent | 839f6bdc15391ab03e52a516a828b7ea157d724a (diff) | |
| download | webmentions-ssg-8fb010e7ae781e94eefe20fe713a98905b031a8f.tar.gz webmentions-ssg-8fb010e7ae781e94eefe20fe713a98905b031a8f.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
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")) |
