Repository navigation
fix: contain Directory-scoped paths to their target directory - #17
Merged
Merged
Conversation
Merged
1 of 6 tasks
OS-pedrogustavobilro
marked this pull request as ready for review
September 7, 2026 12:17
OS-pedrogustavobilro
requested review from
ItsChaceD,
OS-ruimoreiramendes,
andredestro,
jcesarmobile,
markemer and
theproducer
September 7, 2026 12:17
andredestro
approved these changes
Sep 8, 2026
andredestro
left a comment
Contributor
There was a problem hiding this comment.
Is the IONFilesystemLib.zip intentional here?
Contributor
Author
It is not, I was testing building the |
capacitor-bot
pushed a commit
that referenced
this pull request
Sep 8, 2026
## [1.1.4](1.1.3...1.1.4) (2026-09-08) ### Bug Fixes * contain Directory-scoped paths to their target directory ([#17](#17)) ([40a2f20](40a2f20))
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.
Description
This PR fixes an issue that allowed non-canonical file paths to be provided with
IONFILEDirectoryTypeenum. E.g. if a user specifiedIONFILEDirectoryType.cachebut then used../Documents, could access files in documents folder when it was meant to access in cache; or trying to plant a simlink inside path. Now such accesses are blocked. Callers that intentionally need to use a path outside a given directory scenario should use a raw file path.Change Type
Rationale / Problems Fixed
Internal JIRA Reference: https://outsystemsrd.atlassian.net/browse/IONIC-102 (point 1. regarding filesystem plugin)
Similar PR for Android: ionic-team/ion-android-filesystem#11
Tests or Reproductions
Refer to unit tests added that show use cases that get fixed with this PR.
To test in an actual mobile app, you may use a specific branch/commit from the Capacitor Filesystem plugin. On the bottom of the screen, buttons were added that test different use cases of escaping file paths outside the provided Directory. You should press the run all checks button.