fix: cap request bodies, link login error, add book-form retry, guard double add
Limit request bodies to 1 MiB (413 JSON), wire aria-describedby on the login form, add Retry and cancellation to the book form load, disable Add entry while a note POST is in flight, and poll pg_isready in README. Claude-Session: https://claude.ai/code/session_01M9MLit5Ko3X4s7rzC5Kv7X
This commit is contained in:
@@ -30,3 +30,8 @@ class AppTests(ApiTestCase):
|
||||
response.get_json(),
|
||||
{"error": "Request body must be JSON with Content-Type: application/json"},
|
||||
)
|
||||
|
||||
def test_oversized_body_is_rejected_before_parsing(self):
|
||||
response = self.call("POST", "/api/auth/login", {"username": "a", "password": "x" * (2 * 1024 * 1024)})
|
||||
self.assertEqual(response.status_code, 413)
|
||||
self.assertIn("error", response.get_json())
|
||||
|
||||
Reference in New Issue
Block a user