# 2026-11-21T19:21:35Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2 $ python3 student-tests/test_api.py ## API, auth, validation, ACL, transactions (http://127.0.0.1:8080) PASS password stored only as scrypt KDF hash; User has no secret fields 0.81s PASS wrong password and unknown user: identical 401 + Basic challenge 0.79s PASS malformed Basic / Bearer on /auth/sessions / body on login 0.04s PASS password with ':' and non-ASCII UTF-8 works (RFC 7617) 0.71s PASS opaque 256-bit token, unique per login, DB stores only SHA-256 1.19s PASS only Bearer accepted; Basic and X-User-Id never authenticate 0.02s PASS logout revokes only the current session; repeat -> 401 1.22s PASS strict JSON validation -> 400 0.03s PASS message text: 4000 code points OK, 4001 / whitespace / sender_id -> 400 0.03s PASS SQL is parameterized: injection payloads stored verbatim 0.02s PASS ACL: outsider gets 404 everywhere (even for invalid body) 0.03s PASS create chat validation: duplicates, caller missing, unknown member 0.01s PASS compound create-chat rolls back on FK failure (no orphan chat) 0.84s chats before=16, failed insert left 0 rows PASS registration race: 20 parallel same username -> exactly one 201 3.90s 201x1, 409x19, rows=1 PASS keyset pagination: 120 msgs, varying limit, no gaps/duplicates 1.03s 4 pages PASS chat list: only own chats, ordered, cursor bound to user 0.55s PASS read-after-write: confirmed message visible to next read 0.01s PASS unknown route 404 / wrong method 405 in error format 0.00s summary: 18 passed, 0 failed exit=0