Skip to content

Conversation

@ok-nick
Copy link
Contributor

@ok-nick ok-nick commented Oct 27, 2025

Adds extra validation before loading the JUMBF to confirm the input format type matches the given stream, otherwise outputting a more specific error.

Some format types such as MP3 and SVG may require a more in-depth structural check.

Copy link
Collaborator

@mauricefisher64 mauricefisher64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some sugguestions

@ok-nick ok-nick force-pushed the ok-nick/file-signature-check branch from 3a94319 to 04cb96e Compare October 27, 2025 20:52
@ok-nick ok-nick marked this pull request as ready for review October 28, 2025 13:55
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 28, 2025

CodSpeed Performance Report

Merging #1528 will not alter performance

Comparing ok-nick/file-signature-check (a24a0b4) with main (629ab6e)

Summary

✅ 16 untouched
⏩ 2 skipped1

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Contributor

@tmathern tmathern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are unsure about mp3 and svg and need more work/verifications, I'd rather we split it out. To avoid taking the risk of breaking (currently working) edge cases.
The corollary is to add good test coverage using real files to raise confidence we covered all cases (is it even possible with mp3?).

@tmathern tmathern self-requested a review October 29, 2025 01:52
Copy link
Contributor

@tmathern tmathern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving assuming the SVG related question has the same answer as MP3 (please confirm).

@ok-nick
Copy link
Contributor Author

ok-nick commented Nov 14, 2025

I will be changing this PR to perform the support checks as it's being read. This will be much more reliable since we can use our normal parsing methods (like XML for SVG) and it can be done in one pass. We also do this already for some formats, like GIF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants