Repository navigation
Path, archive and file-name safety: shared helper and call sites (family #3847) - #3900
Merged
Merged
Conversation
…ily #3847) New quill/core/safe_paths.py: safe_join/resolve_within (traversal, drive, UNC, NTFS stream, device names, links), safe_filename, unique_name, and contained safe_extract_zip/safe_extract_tar with member, size and ratio caps. Converted: vosk/model_mirrors/release_assets/updates/ffmpeg/piper/scribe daisy extractors, sound packs, radio/cast backups, setup import, mobi pictures, snapshot media names, cross-site and folder-import pictures, static archive slugs, batch speech same-stem outputs, publishing secret file names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Part of #3847.
Builds the shared helper
quill/core/safe_paths.py(safe_join / resolve_within / safe_filename / is_device_name / unique_name / safe_extract_zip / safe_extract_tar with member-count, total-size and ratio caps, refusing traversal, absolute, drive-relative, UNC, NTFS streams, device names, symlinks and junctions) and converts the call sites below. Each has a regression test (tests/unit/core/test_safe_paths.py,tests/unit/core/test_safe_paths_call_sites.py).Converted: vosk, model_mirrors, release_assets, updates (portable), ffmpeg, piper and Scribe DAISY extractors; sound packs; Radio and Cast backup restore; setup import; mobi pictures; WordPress snapshot media names, cross-site and folder-import pictures, static archive slugs; batch speech same-stem outputs; publishing secret file names.
Fixes #2662
Fixes #2442
Fixes #2740
Fixes #3344
Fixes #2779
Fixes #2633
Fixes #3131
Fixes #3275
Fixes #3652
Fixes #3073
The three highs (#2650, #3293, #3349) were already fixed on main (#3887 and the batch_output_plan work); nothing to do there.
🤖 Generated with Claude Code