7 — Т2302 — ебедев — на 5

This commit is contained in:
2026-11-22 23:26:17 +03:00
parent 20afc2c790
commit d15f2a3631
179 changed files with 21709 additions and 54 deletions
+18
View File
@@ -0,0 +1,18 @@
# 2026-11-22T19:20:12Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
$ python3 student-tests/test_attachments.py
## attachments (https://127.0.0.1:8443)
PASS valid PNG and JPEG: 202 queued → ready, byte-exact download by other member 0.94s
PASS exactly-near limit (~10 MiB) accepted, Content-Length > limit -> 413 0.44s 10.00 MiB accepted
PASS oversize rejected BEFORE body is read (early 413, socket) 0.05s HTTP/1.1 413 Request Entity Too Large in 0.016s, 50 MiB never sent
PASS pixel limit: 8000x6000 header -> 413 without decoding 0.10s 0.103s
PASS decompression bomb: IDAT inflates beyond declared size -> 415 0.26s 65295-byte file claiming 64 MiB raw, rejected in 0.087s
PASS corrupted images -> 415 (truncated, bad CRC, no EOI, garbage, empty) 0.42s 9 variants
PASS MIME spoofing by Content-Type/filename -> 415 0.11s
PASS dangerous/invalid filenames -> 400; filename never becomes a path 0.17s
PASS missing/invalid Content-Length -> 400 (chunked upload is not accepted) 0.02s HTTP/1.1 400 Bad Request
PASS ACL: outsider gets 404 for upload/metadata/content; anonymous 401 0.62s outsider 10 MiB upload rejected in 0.30s
PASS variants (lab5): original/thumbnail/crop/optimized OK after ready, unknown -> 400 0.76s
PASS message: foreign/unknown attachment_id -> 404, file of other chat -> 404, limits -> 400 0.51s
PASS idempotency includes attachment_ids (replay same, conflict on change) 0.19s
summary: 13 passed, 0 failed
exit=0