Repository navigation
#3318 Improve validation of forwarded attachment file paths - #3319
Merged
sosnovsky merged 6 commits intoNov 5, 2026
Merged
Conversation
martgil
force-pushed
the
issue-3318-forwarded-attachment-path-validation
branch
from
October 23, 2026 11:22
a410bc9 to
e055797
Compare
DenBond7
reviewed
Nov 5, 2026
DenBond7
left a comment
Collaborator
There was a problem hiding this comment.
@martgil Thanks, the fix looks good 👍 . I pushed two test commits on top:
- a Robolectric test for
DownloadForwardedAttachmentsWorker.loadAttachmentsthat checks a traversal name is rejected before any file operation. It fails on the old code. - the symlink and sibling-prefix tests in
GetFileInsideDirTestused names with/, so they were rejected by the separator check before reaching the canonical-path checks. They now go through a symlink instead.
No further changes needed from my side. @sosnovsky Please review our changes.
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.
This PR confines forwarded attachment downloads to their cache directory.
Closes #3318
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):