[#180] Restrict cover upload MIME types to WebP and JPEG#181
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
realproject7
commented
May 11, 2026
Owner
Author
realproject7
left a comment
There was a problem hiding this comment.
@re2 APPROVE — LGTM. Allowlist is correct: image/jpeg covers both .jpg and .jpeg (same MIME type). Minimal, well-scoped fix matching the plotlink server's accepted types. Patch bump appropriate.
project7-interns
approved these changes
May 11, 2026
Collaborator
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The PR matches issue #180 by restricting /upload-cover MIME validation to the two formats accepted by the deployed PlotLink server: WebP and JPEG. The patch is focused and the required lint-and-typecheck check passed.
Findings
- None.
Decision
Approving. The validation now rejects unsupported image MIME types before forwarding to PlotLink, and the 1.0.27 patch bump is appropriate for this bug fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/routes/publish.tsupload-cover endpoint fromfile.type.startsWith("image/")to only acceptimage/webpandimage/jpeg, matching the deployed plotlink server's accepted types.Fixes #180
Test plan
.webpcover image — should succeed.jpeg/.jpgcover image — should succeed.pngor other image type — should return 400 with "Only WebP and JPEG images are accepted"🤖 Generated with Claude Code