Uh oh!
There was an error while loading. Please reload this page.
fix(files): Check if target path is a descendant of the shared folder - #47756
Merged
Conversation
solracsf
requested review from
a team, come-nc, icewind1991, provokateurin, skjnldsv, susnux and yemkareems
and removed request for
a teamSeptember 4, 2024 20:44
susnux
approved these changes
Sep 4, 2024
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
provokateurin
approved these changes
Sep 5, 2024
solracsfforce-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 07:10
3cd9e0f to
014c6e6Comparesolracsfforce-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 07:18
014c6e6 to
f7a3fd6Comparesolracsf
commented
Sep 5, 2024
MemberAuthor
/backport to stable30 |
solracsf
commented
Sep 5, 2024
MemberAuthor
/backport to stable29 |
This comment was marked as outdated.
This comment was marked as outdated.
solracsfforce-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 09:17
f7a3fd6 to
2cf3087Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
MemberAuthor
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. |
provokateurin
commented
Sep 5, 2024
Member
Ok, sounds good then. |
susnux
approved these changes
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
susnuxforce-pushed
the
fixingPathShareCheck
branch
from
September 5, 2024 21:54
2cf3087 to
0308001Compare
This was referenced Sep 6, 2024
Merged
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 freeto 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