Lowers the filename cap in SanitizeFilename from 255 to 128 bytes, so over-long multipart filenames truncate instead of being stored/echoed verbatim (DB-field bloat, unbounded Content-Disposition). Adds a repro regression test (250-char name -> 128).
Verified locally: multipart create with a 246+4 char filename returns 201 with a 128-char filename; GET /f/{aid}/{name} Content-Disposition echoes the truncated name only.
Fix attempt 1. Ref #248.
Lowers the filename cap in SanitizeFilename from 255 to 128 bytes, so over-long multipart filenames truncate instead of being stored/echoed verbatim (DB-field bloat, unbounded Content-Disposition). Adds a repro regression test (250-char name -> 128).
Verified locally: multipart create with a 246+4 char filename returns 201 with a 128-char filename; GET /f/{aid}/{name} Content-Disposition echoes the truncated name only.
Fix attempt 1 (per #248 QA counter).
A 250-char multipart filename was accepted and echoed verbatim in
Content-Disposition. SanitizeFilename already truncates; lower the cap
from 255 to 128 so DB rows and header echoes stay bounded (#248).
fen
merged commit 91757752b8 into dev2026-09-17 19:16:33 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fix attempt 1. Ref #248.
Lowers the filename cap in SanitizeFilename from 255 to 128 bytes, so over-long multipart filenames truncate instead of being stored/echoed verbatim (DB-field bloat, unbounded Content-Disposition). Adds a repro regression test (250-char name -> 128).
Verified locally: multipart create with a 246+4 char filename returns 201 with a 128-char filename; GET /f/{aid}/{name} Content-Disposition echoes the truncated name only.
Fix attempt 1 (per #248 QA counter).