Skip to content

Conversation

@icewind1991
Copy link
Member

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)

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Nov 2, 2022
@icewind1991 icewind1991 added this to the Nextcloud 26 milestone Nov 2, 2022
@icewind1991 icewind1991 requested review from a team, CarlSchwan, come-nc and juliusknorr and removed request for a team November 2, 2022 11:50
Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 merged commit 3b7cc31 into master Dec 16, 2022
@PVince81 PVince81 deleted the cache-jail-path-prefix branch December 16, 2022 16:27
@PVince81
Copy link
Member

PVince81 commented Dec 16, 2022

/backport to stable25

@PVince81
Copy link
Member

/backport to stable24

@backportbot-nextcloud
Copy link

The backport to stabe25 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable24 failed. Please do this backport manually.

@icewind1991
Copy link
Member Author

/backport to stable25

@icewind1991
Copy link
Member Author

/backport to stable24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants