summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-03-13 19:28:00 +0100
committerGitHub <noreply@github.com>2017-03-13 19:28:00 +0100
commitaf16416de51a40e3fbb1e8499bbe8bf3b77ab5af (patch)
tree7359891f9c6568adcf6429a768f08bebc8257bf9
parent756bc90eace86b69309083ce924ccb9055a526f9 (diff)
parent6d0c756ff9c1d920161ebee20717c4e4be757b7c (diff)
downloadnextcloud-server-af16416de51a40e3fbb1e8499bbe8bf3b77ab5af.tar.gz
nextcloud-server-af16416de51a40e3fbb1e8499bbe8bf3b77ab5af.zip
Merge pull request #3828 from nextcloud/no-no-empty-wildcard-search
dont allow empty wildcard search
-rw-r--r--lib/private/Files/Cache/Cache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index c3ac0f8444f..95a78f99829 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -594,6 +594,10 @@ class Cache implements ICache {
// normalize pattern
$pattern = $this->normalize($pattern);
+ if ($pattern === '%%') {
+ return [];
+ }
+
$sql = '
SELECT `fileid`, `storage`, `path`, `parent`, `name`,