Repository navigation
fix(ingest): bound decompressed request size - #1662
Conversation
Gzip request bodies are now read through a byte limit. A body that decompresses past INGEST_MAX_DECODED_BODY_BYTES (default 8x INGEST_MAX_REQUEST_BODY_BYTES, 160 MB) is refused with a 413, on the OTLP HTTP, Cloudflare Logpush and inline session replay paths.
Maple review🟢 Confidence 9/10 · safe to merge Bounds gunzip output behind a new
Before merge
Findings🔵 Note · F1 · Handler-level 413 reason mapping for over-limit gzip is untestedtests · Only 🤖 Prompt to fix this finding with an AI agentWhat was checked
Observability coverage: 2 of 2 changes observable
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merged with 2 steps from "Before merge" still open. If they are done, tick them on the review comment; if not, now is the time.
|
What changed
gunzip_bounded). Past the limit the request gets a 413 (payload_too_large), tagged the same way as an oversized compressed body.INGEST_MAX_DECODED_BODY_BYTES, default 8xINGEST_MAX_REQUEST_BODY_BYTES(160 MB). Boot fails if it is set below the body limit. Passed through inalchemy.run.tslike the other ingest knobs.decode_payloadcaller (OTLP HTTP, Cloudflare Logpush) and to the inline session replay path. Invalid UTF-8 in a replay chunk keeps the same rejection message as before.accept_compressedis configured and tonic keeps its default 4 MB decoding limit.Verification
main.rs: small gzip decodes at exactly the limit, a 4 MiB inflating body is refused with 413 under a 1 MiB limit and accepted when the limit allows it, replay text decoding is bounded and keeps the invalid-data error.ingest-rust-tests.ymlruns them.Not changed
decompressed_len) streams into a sink and does not allocate, so it is left as is./mnt/wal, created root-owned by the EC2 user data) holding root-owned segments, so a non-root user needs a coordinated host-side ownership change first.Need help on this PR? Tag
@codesmith-botwith what you need.