-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
escape path prefix when doing cache jail search #34924
Conversation
Signed-off-by: Robin Appelman <robin@icewind.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/backport to stable25 |
/backport to stable24 |
The backport to stabe25 failed. Please do this backport manually. |
The backport to stable24 failed. Please do this backport manually. |
/backport to stable25 |
/backport to stable24 |
Currently the
CacheJail
doesn't escape the path of the jail when creating the search query for the files inside the jail. This doesn't break things since at most it will make the sql query return a few more results which will be filtered out in later steps.It does however interfere with the optimization step that is required for mysql to be able to use the "path prefix" index on the search query. Which does properly like-escape the paths.
This causes the "path prefix" index to not be used when a cache jail with an "_" in the path is part of the search. (This also includes any groupfolders since those always have "__groupfolders" in the search path)