fix: stream cover uploads with a per-chunk size cap
The cover multipart path called Field::bytes(), buffering the entire field into memory before parse_image checked max_file_bytes — an oversized cover was fully allocated before rejection. Add read_capped/push_capped, which reject with 413 as soon as the running total exceeds the cap (the offending chunk is never copied in), and route both cover handlers and stage_image_part through it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2
backend/Cargo.lock
generated
2
backend/Cargo.lock
generated
@@ -1558,7 +1558,7 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
|
||||
|
||||
[[package]]
|
||||
name = "mangalord"
|
||||
version = "0.124.15"
|
||||
version = "0.124.16"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
|
||||
Reference in New Issue
Block a user