| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Co-Authored-By: ForgeCode <noreply@forgecode.dev>
Sorry, something went wrong.
|
Hi @tusharmath, when you have a chance, would you mind reviewing this MIME-detection fix and letting me know if any changes are needed? Thank you! Co-Authored-By: ForgeCode noreply@forgecode.dev |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Root cause
infer::get scans the entire supplied buffer and recognizes the %PDF sequence at byte offset 449. Limiting the buffer to the issue's suggested 1 KiB would still include that sequence and therefore would not fix this reproduction. The minimal reliable fix is to trust the existing known-text extension allowlist before content sniffing.
Validation
cargo insta test was unavailable because the local cargo-insta command is not installed, so the complete crate suite was run directly with cargo test. A workspace-wide clippy attempt stopped while building the untouched forge_repo crate because local protoc is absent; CI installs protoc, and the touched crate's all-target/all-feature clippy is green.
Fixes #3812
Co-Authored-By: ForgeCode noreply@forgecode.dev