Skip to content

fix(thumb): generate thumbnail file names and validate request headers - #260

Merged
xsahil03x merged 1 commit into
mainfrom
fix/thumbnail-file-names-and-headers
Nov 26, 2026
Merged

xsahil03x merged 1 commit into
mainfrom
fix/thumbnail-file-names-and-headers

Conversation

@xsahil03x

@xsahil03x xsahil03x commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Part of FLU-1382. Stacked on #259.

What

  • thumbnailFile / thumbnailFiles write each thumbnail as <uuid>.<ext> in a fixed stream_thumbnail temp folder on every platform, instead of naming it after the video. Linux creates it with g_file_open_tmp (exclusive, 0600); web downloads are named thumbnail.<ext>. This removes the per-platform name parsing.
  • StreamThumbnailSource.network throws an ArgumentError when a header name isn't an HTTP token or a value contains CR, LF or NUL. The Linux plugin re-checks, since it builds the raw header lines.
  • On Linux, a request with headers sets FFmpeg's max_redirects to 0. FFmpeg 8.1 added that option; older versions ignore it and still follow redirects (noted in the CHANGELOG).

Verified

  • flutter analyze --fatal-infos and the unit tests pass, including the header tests on StreamThumbnailSource.
  • Integration tests pass on macOS (16, 1 skipped for network), including a video file named ..%2F..%2Fescaped.mp4. iOS simulator passed before the rebase onto feat(thumb)!: replace the video string with StreamThumbnailSource #259.
  • Linux and Windows are covered by the native-builds workflow on this PR.

🤖 Generated with Claude Code

@xsahil03x
xsahil03x requested a review from a team as a code owner November 25, 2026 11:53
@github-actions github-actions Bot added the ready Pull request ready to be reviewed label Nov 25, 2026
@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.72%. Comparing base (d6eebe8) to head (212da03).

Additional details and impacted files
@@                    Coverage Diff                    @@
##           feat/thumbnail-source     #260      +/-   ##
=========================================================
+ Coverage                  75.71%   75.72%   +0.01%     
=========================================================
  Files                        225      225              
  Lines                       9838     9843       +5     
=========================================================
+ Hits                        7449     7454       +5     
  Misses                      2389     2389              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xsahil03x
xsahil03x changed the base branch from main to feat/thumbnail-source November 25, 2026 14:29
@xsahil03x
xsahil03x added this pull request to stack #262 November 25, 2026 14:31
@xsahil03x
xsahil03x force-pushed the fix/thumbnail-file-names-and-headers branch from ca8c85e to 212da03 Compare November 25, 2026 15:20
@github-actions github-actions Bot added approved Approved by a reviewer and removed ready Pull request ready to be reviewed labels Nov 25, 2026
Base automatically changed from feat/thumbnail-source to main November 26, 2026 12:07
- thumbnailFile and thumbnailFiles write each thumbnail under a generated
  name in a stream_thumbnail temp folder; web downloads are named
  thumbnail.<ext>.
- StreamThumbnailSource.network rejects header names that are not HTTP
  tokens and values containing CR, LF or NUL. The Linux plugin re-checks.
- On Linux, a request with headers does not follow redirects (FFmpeg 8.1+).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xsahil03x
xsahil03x force-pushed the fix/thumbnail-file-names-and-headers branch from 212da03 to 441f49a Compare November 26, 2026 12:07
@xsahil03x
xsahil03x enabled stacked auto-merge (squash) November 26, 2026 12:08
@xsahil03x
xsahil03x merged commit effcf38 into main Nov 26, 2026
22 checks passed
@xsahil03x
xsahil03x deleted the fix/thumbnail-file-names-and-headers branch November 26, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Approved by a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants