Implement upload sniffing, size cap and decode-bomb guard #57

Closed
opened 2026-07-05 19:21:28 +01:00 by TimCane · 0 comments
TimCane commented 2026-07-05 19:21:28 +01:00 (Migrated from github.com)

Goal

Magic-byte JPEG/PNG sniff (reject renamed files), a 10MB Kestrel + explicit cap -> 413 image-too-large, and header-dimension >8000x8000 rejection (the backend half of the guard).

References

Done when

  • Advances M7 A3 (renamed PNG + 40MB rejected).

Part of M7: Hardening.

## Goal Magic-byte JPEG/PNG sniff (reject renamed files), a 10MB Kestrel + explicit cap -> 413 image-too-large, and header-dimension >8000x8000 rejection (the backend half of the guard). ## References - [docs/10-security-privacy.md#upload-hardening](https://github.com/TimCane/bill-splitter/blob/main/docs/10-security-privacy.md#upload-hardening) - [docs/06-ocr-service.md#post-ocr](https://github.com/TimCane/bill-splitter/blob/main/docs/06-ocr-service.md#post-ocr) ## Done when - Advances M7 A3 (renamed PNG + 40MB rejected). --- Part of **M7: Hardening**.
Sign in to join this conversation.
No description provided.