fix: codex review batch — history links, thumbnails, music transcode, calibre, SQL params - #63
Open
PetalCat wants to merge 5 commits into
Open
fix: codex review batch — history links, thumbnails, music transcode, calibre, SQL params#63PetalCat wants to merge 5 commits into
PetalCat wants to merge 5 commits into
Conversation
The music client was requesting Jellyfin's /Audio/{id}/universal endpoint
with TranscodingContainer=ts, but `ts` is an HLS segment container — the
universal audio endpoint delivers a progressive audio stream. The stream
proxy's own default for that path is `aac` (the canonical wider-compat
choice). Client and server disagreed, breaking playback.
Aligning the client to `aac` so what we send matches what the proxy
would emit if nothing were specified.
Finding A12 from review.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
computeStats() in stats-engine.ts was interpolating `mediaType` directly into SQL via a template-literal-built `mediaTypeFilter` fragment. Callers are controlled today, but the `type` query param on /api/user/stats flows into this function end-to-end — making it a real SQL-injection sharp edge. Replaces the string interpolation with a parameterized `?` placeholder by splitting into two prepared statements (with-filter and without-filter), matching the existing pattern used elsewhere in src/lib/server for play_sessions queries. No behavioral change for callers. Audited the remainder of the file: all other queries (media_actions, interaction_events, stats_rollups upserts) already use `?` binding. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… mediaType (review A15, security)
PetalCat
force-pushed
the
fix/music-transcode-container-apr17
branch
2 times, most recently
from
May 19, 2026 01:56
9958ef4 to
c485404
Compare
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
Batch of codex review fixes from April 2026 that were implemented in agent worktrees but never pushed or merged. Rolled up via
fix/music-transcode-container-apr17:/media/shapecomputeStatsmediaType to prevent SQL injectionIndividual fix branches also pushed separately for reference:
fix/history-feed-link-format-apr17fix/compute-stats-sql-params-apr17fix/history-thumbnail-paths-apr17fix/calibre-books-investigation-apr17Test plan
/media/pathscomputeStatsqueries are parameterized (no raw interpolation)🤖 Generated with Claude Code