# 2026-11-05T21:20:09Z commit=n/a host=Linux 6.18.44-fc-v236 x86_64 cpus=2
$ python3 student-tests/test_attachments.py
## attachments (http://127.0.0.1:8080)
PASS valid PNG and JPEG: 201 ready, byte-exact download by other member   0.12s
PASS exactly-near limit (~10 MiB) accepted, Content-Length > limit -> 413   0.56s  10.00 MiB accepted
PASS oversize rejected BEFORE body is read (early 413, socket)        0.00s  HTTP/1.1 413 Content Too Large in 0.004s, 50 MiB never sent
PASS pixel limit: 8000x6000 header -> 413 without decoding            0.05s  0.051s
PASS decompression bomb: IDAT inflates beyond declared size -> 415    0.32s  65295-byte file claiming 64 MiB raw, rejected in 0.022s
PASS corrupted images -> 415 (truncated, bad CRC, no EOI, garbage, empty)   0.21s  9 variants
PASS MIME spoofing by Content-Type/filename -> 415                    0.07s
PASS dangerous/invalid filenames -> 400; filename never becomes a path   0.08s
PASS missing/invalid Content-Length -> 400 (chunked upload is not accepted)   0.01s  HTTP/1.1 400 Bad Request
PASS ACL: outsider gets 404 for upload/metadata/content; anonymous 401   0.53s  outsider 10 MiB upload rejected in 0.44s
PASS variants: original OK, thumbnail absent in lab4 -> 404, unknown -> 400   0.03s
PASS message: foreign/unknown attachment_id -> 404, file of other chat -> 404, limits -> 400   0.10s
PASS idempotency includes attachment_ids (replay same, conflict on change)   0.06s
summary: 13 passed, 0 failed
exit=0
