Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid using '..' in paths passed to PathTree #23862

Merged
merged 2 commits into from
Feb 22, 2022

Conversation

yrodiere
Copy link
Member

@aloubyansky as you requested here.

If you meant to do this for DirectoryPathTree only, we can drop the second commit.

Because we want the paths to be interpreted in a way that's as similar
to ClassLoader#getResource as possible.

With the previous behavior, if I pass foo/bar/.. to DirectoryPathTree,
it will automatically be resolved to foo/.
So in a build step for example, we might end up accepting the path as valid.
Later at runtime, we might pass the same string (foo/bar/..) to ClassLoader#getRessource.
And then it will fail, because .. has no special meaning for ClassLoader#getResource...

See quarkusio#23692 (comment)
For consistency with DirectoryPathTree
@quarkus-bot quarkus-bot bot added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Feb 22, 2022
@aloubyansky
Copy link
Member

Thanks @yrodiere

@yrodiere yrodiere added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 22, 2022
@aloubyansky aloubyansky merged commit 2239a38 into quarkusio:main Feb 22, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Feb 22, 2022
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 22, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.3.Final Feb 28, 2022
@yrodiere yrodiere deleted the pathtree-forbid-dotdot branch May 31, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants