Repository navigation
Keep local absolute paths out of stored error text - #22
Merged
Merged
Conversation
Pillow's UnidentifiedImageError and the OSError family name the file they were handed, and describe_failure's fallback stored that text as is in files.error, where it reaches the HTML, CSV and JSON reports and the exports. The path is the case folder for a staged or on-demand copy and the evidence mount otherwise. imaging.scrub_local_paths removes a known path in every spelling a message can carry (either separator, a repr's doubled backslashes) and anything else shaped like an absolute path, quoted or bare: POSIX, Windows drive, UNC. describe_failure and the video hashing OSError site in the pipeline go through it; the row already identifies the file, so the message keeps the exception type and the non-path part of its text. tests/test_error_text.py covers both sites with real Pillow and OSError messages, the Windows and UNC shapes as strings, and one end-to-end run of the pipeline on synthetic bad files. Each stored-text test fails against the previous code. Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
Keeps the examiner's local paths out of stored error text.
Pillow and the OSError family name the file they were handed, and that text was stored as is in files.error and reached the reports and exports. The row already identifies the file, so the message keeps the exception type and the non-path part of its text.
The reference-mode archive branch adds two more sites (the "source archive unavailable" messages name the zip); route those through the same helper when it merges.
🤖 Generated with Claude Code