filter ACL forbidden paths from search query#4745
Merged
Merged
Conversation
Member
Author
|
Fixes nextcloud/server#60306 |
edc4213 to
9d76275
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
9d76275 to
673b955
Compare
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
provokateurin
approved these changes
Jun 11, 2026
This was referenced Jun 11, 2026
Member
|
@icewind1991 @provokateurin While the fix solves the issue for users with forbidden paths it breaks searching for users without any forbidden path. It can be reproduced with the steps from nextcloud/server#60306 but searching as the user manager instead of as the user restricted. The E2E test from #4675 also fails for the search done as user manager. Adding something like: to Besides that, would it be possible to backport this pull request and the follow up also to stable32? Thanks! |
Member
Author
|
/backport to stable32 |
3 tasks
1 task
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.
Currently, the logic for removing files the user doesn't have access to from search is done as a post-processing step.
While this filters out the correct entries, it means that the number of returned results is less than the limit asked for (or even 0). Which the search logic interprets as there being no more results.
By applying the filtering as part of the query, we return the number of results asked for.