mirror of
https://github.com/nextcloud/server.git
synced 2026-04-29 01:50:33 -04:00
dont apply jail search filter is on the root
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
96b9aeecd5
commit
a9fbd0b41b
1 changed files with 12 additions and 0 deletions
|
|
@ -244,6 +244,10 @@ class CacheJail extends CacheWrapper {
|
|||
* @return array an array of file data
|
||||
*/
|
||||
public function search($pattern) {
|
||||
if ($this->getGetUnjailedRoot() === '' || $this->getGetUnjailedRoot() === '/') {
|
||||
return parent::search($pattern);
|
||||
}
|
||||
|
||||
// normalize pattern
|
||||
$pattern = $this->normalize($pattern);
|
||||
|
||||
|
|
@ -277,6 +281,10 @@ class CacheJail extends CacheWrapper {
|
|||
* @return array
|
||||
*/
|
||||
public function searchByMime($mimetype) {
|
||||
if ($this->getGetUnjailedRoot() === '' || $this->getGetUnjailedRoot() === '/') {
|
||||
return parent::searchByMime($mimetype);
|
||||
}
|
||||
|
||||
$mimeId = $this->mimetypeLoader->getId($mimetype);
|
||||
|
||||
$query = $this->getQueryBuilder();
|
||||
|
|
@ -304,6 +312,10 @@ class CacheJail extends CacheWrapper {
|
|||
}
|
||||
|
||||
public function searchQuery(ISearchQuery $query) {
|
||||
if ($this->getGetUnjailedRoot() === '' || $this->getGetUnjailedRoot() === '/') {
|
||||
return parent::searchQuery($query);
|
||||
}
|
||||
|
||||
$prefixFilter = new SearchComparison(
|
||||
ISearchComparison::COMPARE_LIKE,
|
||||
'path',
|
||||
|
|
|
|||
Loading…
Reference in a new issue