-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(files): Check if target path is a descendant of the shared folder #47756
Merged
+11
−2
Conversation
This file contains 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
solracsf
added
2. developing
Work in progress
3. to review
Waiting for reviews
and removed
2. developing
Work in progress
labels
Sep 4, 2024
solracsf
requested review from
icewind1991,
a team,
skjnldsv,
yemkareems,
susnux,
come-nc and
provokateurin
and removed request for
a team
September 4, 2024 20:44
susnux
approved these changes
Sep 4, 2024
provokateurin
approved these changes
Sep 5, 2024
solracsf
added
2. developing
Work in progress
and removed
3. to review
Waiting for reviews
labels
Sep 5, 2024
solracsf
force-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 07:10
3cd9e0f
to
014c6e6
Compare
solracsf
added
3. to review
Waiting for reviews
and removed
2. developing
Work in progress
labels
Sep 5, 2024
solracsf
force-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 07:18
014c6e6
to
f7a3fd6
Compare
/backport to stable30 |
/backport to stable29 |
This comment was marked as outdated.
This comment was marked as outdated.
solracsf
force-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 09:17
f7a3fd6
to
2cf3087
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Well, the report is about 29 only, and that function was reworked on 29 only at that time (no backport to 28). So, I believe 28 is not affected. |
Ok, sounds good then. |
susnux
approved these changes
Sep 5, 2024
susnux
added
4. to release
Ready to be released and/or waiting for tests to finish
and removed
3. to review
Waiting for reviews
labels
Sep 5, 2024
…lder path Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: fix tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: add tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests
susnux
force-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 21:54
2cf3087
to
0308001
Compare
This was referenced Sep 6, 2024
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.
Fix #47713 (tested)
Summary
Check is overly broad because it triggers if the target path starts with the shared folder's path, even if the target path is a sibling or a nested folder that is not actually within the shared folder.
The function should check if the target path is a direct descendant of the shared folder path rather than just starting with it. This can be done by ensuring that the target path either matches the shared path exactly or has a
/
immediately following the shared folder path.Checklist