diff options
| author | Dennis Fink | 2026-10-31 16:42:44 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-31 16:42:44 +0100 |
| commit | 3494eab1208dc18478485e02c61e292556502fa6 (patch) | |
| tree | 5d9e95d709b119a0245d0294837f9b6a7e38bff1 /tests/test_views.py | |
| parent | fdb1762715658eae987dd104a0e6d3cb92a4a8d7 (diff) | |
| download | webmentions-ssg-3494eab1208dc18478485e02c61e292556502fa6.tar.gz webmentions-ssg-3494eab1208dc18478485e02c61e292556502fa6.zip | |
fix(core): harden session and credential security
Require persistent non-placeholder signing keys outside local
development and bind login sessions to the current password hash so
password changes revoke existing cookies.
Enforce a minimal password policy for user administration while
preserving long Unicode passphrases without arbitrary composition
limits.
Diffstat (limited to 'tests/test_views.py')
| -rw-r--r-- | tests/test_views.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_views.py b/tests/test_views.py index fb12b8b..21a33bf 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -60,7 +60,7 @@ def log_in(app: Flask, client: FlaskClient) -> None: db.session.add(user) db.session.commit() - user_id = user.id + user_id = user.get_id() with client.session_transaction() as session: session["_user_id"] = str(user_id) @@ -422,7 +422,7 @@ def test_login_redirects_to_local_next_page( user = User(username="admin", password="test") db.session.add(user) db.session.commit() - user_id = user.id + user_id = user.get_id() mock_login_form(views_module, monkeypatch, valid=True) @@ -463,7 +463,7 @@ def test_login_rejects_unsafe_next_page( user = User(username="admin", password="test") db.session.add(user) db.session.commit() - user_id = user.id + user_id = user.get_id() mock_login_form(views_module, monkeypatch, valid=True) @@ -1173,7 +1173,7 @@ def test_admin_only_links_safe_existing_status_urls( user = User(username="admin", password="test") db.session.add(user) db.session.commit() - user_id = user.id + user_id = user.get_id() with client.session_transaction() as session: session["_user_id"] = str(user_id) |
