Derived file upload content type from extension instead of client#26751
Derived file upload content type from extension instead of client#26751kevinansfield merged 1 commit intomainfrom
Conversation
The /files/upload endpoint now determines the MIME type from the file extension server-side rather than trusting the client-provided value, preventing content type spoofing on S3/GCS storage backends.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe pull request modifies how file MIME types are determined when uploading files. The implementation change in 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
…6751) ref https://linear.app/ghost/issue/ONC-1525/ The /files/upload endpoint now determines the MIME type from the file extension server-side rather than trusting the client-provided value, preventing content type spoofing on S3/GCS storage backends.
The /files/upload endpoint now determines the MIME type from the
file extension server-side rather than trusting the client-provided
value, preventing content type spoofing on S3/GCS storage backends.