refactor: enhance security comments and error handling across multiple modules

This commit is contained in:
Rightup
2026-05-27 22:07:34 +01:00
parent a5355f188d
commit 60ca184dbd
11 changed files with 30 additions and 23 deletions
+5 -4
View File
@@ -73,11 +73,12 @@ def test_check_auth_skips_options_and_login(monkeypatch):
assert check_auth() is None
def test_check_auth_missing_handlers_returns_500_json(monkeypatch):
def test_check_auth_missing_handlers_raises_http_500(monkeypatch):
_set_cp(monkeypatch, cfg={})
out = check_auth()
assert out["success"] is False
assert cherrypy.response.status == 500
with pytest.raises(cherrypy.HTTPError) as exc_info:
check_auth()
assert exc_info.value.status == 500
def test_check_auth_accepts_bearer_token(monkeypatch):