From 3494eab1208dc18478485e02c61e292556502fa6 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 31 Oct 2026 16:42:44 +0100 Subject: 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. --- tests/test_views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test_views.py') 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) -- cgit v1.3.1