# 2026-10-28T12:44:18Z $ make test-attachments PASS png+jpeg upload, member download is byte-identical, metadata stable PASS message with only attachments, order kept, history shows links, re-use by other member PASS idempotency: missing attachment_ids == [], other attachments -> 409 PASS exactly 40 000 000 px accepted PASS 10 MiB + 1 byte with Content-Length -> 413 PASS 10 MiB + 1 byte chunked (no Content-Length) -> 413 while streaming PASS decompression bomb 8000x5001 px (~1 KB/40 MB raw) -> 413 PASS RGB 20000x20000 header -> 413 before decode PASS truncated PNG -> 415 PASS PNG with damaged IDAT byte (CRC) -> 415 PASS truncated JPEG -> 415 PASS PNG bytes declared image/jpeg -> 415 PASS JPEG bytes declared image/png -> 415 PASS text declared image/png -> 415 PASS GIF declared image/png -> 415 PASS SVG/HTML declared image/png -> 415 PASS PNG magic + garbage -> 415 PASS empty body -> 415 PASS Content-Type application/octet-stream -> 415 PASS Content-Type multipart/form-data -> 415 PASS filename missing -> 400 PASS filename path ../ -> 400 PASS filename slash -> 400 PASS filename backslash -> 400 PASS filename NUL -> 400 PASS filename newline -> 400 PASS filename bidi RLO -> 400 PASS filename dot-dot -> 400 PASS filename blank -> 400 PASS filename 256 chars -> 400 PASS outsider uploads into chat -> 404 PASS outsider metadata -> 404 PASS outsider content -> 404 PASS unknown attachment -> 404 PASS invalid attachment UUID -> 400 PASS no session -> 401 PASS variant thumbnail not produced in lab4 -> 404 PASS unknown variant -> 400 PASS variant=original explicit -> 200 PASS attachment of another chat (same author) -> 404 PASS outsider links chat attachment into own chat -> 404 PASS unknown attachment id in message -> 404 PASS 11 attachment ids -> 400 PASS duplicate attachment ids -> 400 PASS blank text without attachments -> 400 PASS attachment_ids wrong type -> 400 PASS DB composite FK rejects cross-chat link even bypassing API PASS: 47 attachment cases