aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/Wrapper/CacheJail.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-241-24/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* also improe cache ci for shared cacheRobin Appelman2024-02-091-6/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* optimize cache jail creationRobin Appelman2023-10-191-2/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_privateRobin Appelman2023-06-011-1/+1
|\ | | | | Refactors "strpos" calls in lib/private to improve code readability.
| * Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-1/+1
| | | | | | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* | Fix return types in phpdocCôme Chilliet2023-05-151-1/+1
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix type hintsRobin Appelman2023-04-041-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* escape path prefix when doing cache jail searchRobin Appelman2022-11-021-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix various other small psalm issuesCarl Schwan2022-10-171-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* directly build the search filter for shared storage instead of setting up ↵Robin Appelman2022-08-171-2/+6
| | | | | | the source cache Signed-off-by: Robin Appelman <robin@icewind.nl>
* optimize search post-processing for jail wrapperRobin Appelman2022-08-161-5/+7
| | | | | | don't both asking the wrapped cache if we know it's not in our jail anyway Signed-off-by: Robin Appelman <robin@icewind.nl>
* Document all getIncomplete implementations as returning string|falseCôme Chilliet2022-08-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* properly handle cases where cache wrappers block accessRobin Appelman2021-11-011-1/+1
| | | | | | `CacheWrapper::formatCacheEntry` can return false for files that should be filtered out Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #28476 from nextcloud/search-jail-insensitiveVincent Petry2021-08-241-1/+1
|\ | | | | use case insensitive like when limiting search to jail
| * use case insensitive like when limiting search to jailRobin Appelman2021-08-171-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | use getGetUnjailedRoot to determine if jailed search needs the path filterRobin Appelman2021-08-231-1/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont apply jail search filter is on the rootRobin Appelman2021-07-261-11/+15
| | | | | | the extra '/' breaks things and the filter wouldn't do anything anyway except making the databases job harder Signed-off-by: Robin Appelman <robin@icewind.nl>
* use searchoperation for storage filter instead of db expressionRobin Appelman2021-06-141-10/+16
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* rework search api to allow searching on multiple caches at onceRobin Appelman2021-06-141-103/+24
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* properly use limit and offset for search in Jail wrapperRobin Appelman2021-05-211-7/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* adjust testsRobin Appelman2021-01-261-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix search in nested jailsRobin Appelman2021-01-261-19/+35
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix cachjail searching for rootRobin Appelman2021-01-261-3/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* do cachejail search filtering in sqlRobin Appelman2021-01-261-3/+57
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use matching parameter names form interfaces and implementationsMorris Jobke2020-08-191-2/+2
| | | | | | Found by Psalm 3.14.1 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+0
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use lowercase true, false and null constantsChristoph Wurst2020-03-251-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove deprecated searchByTagRoeland Jago Douma2019-07-261-12/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Avoid calculating folder size for parent that needs scan.Ari Selseng2019-03-061-2/+2
| | | | Signed-off-by: Ari Selseng <ari@selseng.net>
* Properly search the root of a shared external storageRoeland Jago Douma2018-11-051-1/+1
| | | | | | | | | | | Fixes #1020 When an external storage is shared with you in full the root is '' (empty). This adds an extra check for an empty jail basically. Because if the jail is on the empty string. It matches all paths. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* CacheJail should apply limit and offset after searchingRoeland Jago Douma2018-02-071-2/+9
| | | | | | Else the results might not be correct. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not try to get the jailed path if we can't find the idRoeland Jago Douma2018-02-031-0/+4
| | | | | | | | | Fixes #8047 If we can't find the file by id there we should just return null instead of trying to get the jailed path of null. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* delay calculating the shared cache root until it's usedRobin Appelman2017-12-041-9/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersMorris Jobke2017-11-061-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* fix moving folders out of a cache jailRobin Appelman2017-06-151-1/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Implement webdav SEARCHRobin Appelman2017-03-011-0/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Make sure we use the correct storage id when scanning a jailed storageRobin Appelman2017-01-251-5/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* make source cache injectable in cache wrappersRobin Appelman2016-11-171-18/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* reuse the known rootinfo in the shared cache when possibleRobin Appelman2016-11-171-1/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Adding test case for getPathById including a jailed cache where root is just ↵Thomas Müller2016-08-051-1/+3
| | | | empty
* getJailedPath expects $path to have a trailing / - fixes #25464Thomas Müller2016-08-051-0/+1
|
* Update with robinJoas Schilling2016-07-211-1/+1
|
* Fix othersJoas Schilling2016-07-211-2/+3
|