diff options
| author | Dennis Fink | 2026-10-27 23:49:24 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-27 23:49:24 +0100 |
| commit | c6a40d741c41cdc0af38eef89247c2120dcb6270 (patch) | |
| tree | 414df73642a42f4e24b3a0b4bb2bf914d678583d /webmentions_ssg/views.py | |
| parent | 17ab56a3c7d3dbb3d66edf380ab637a61cefe50c (diff) | |
| download | webmentions-ssg-c6a40d741c41cdc0af38eef89247c2120dcb6270.tar.gz webmentions-ssg-c6a40d741c41cdc0af38eef89247c2120dcb6270.zip | |
fix(core): resolve static type checking issues
Diffstat (limited to 'webmentions_ssg/views.py')
| -rw-r--r-- | webmentions_ssg/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webmentions_ssg/views.py b/webmentions_ssg/views.py index b2f7e7e..23e8406 100644 --- a/webmentions_ssg/views.py +++ b/webmentions_ssg/views.py @@ -2,6 +2,8 @@ # # SPDX-License-Identifier: BSD-3-Clause +"""Provide routes for authentication and Webmention administration.""" + import uuid from typing import cast from urllib.parse import urlsplit @@ -63,7 +65,8 @@ def login() -> ResponseReturnValue: sa.select(User).where(User.username == form.username.data) ) - if user is None or not user.check_password(form.password.data): + password = form.password.data + if user is None or (password is not None and not user.check_password(password)): flash("Invalid username or password", "danger") return redirect(url_for("root.login")) |
