From dc467c74e90f15719d7c12a765d1b3d2c538931e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 13 Mar 2017 16:06:19 +0100 Subject: [PATCH] dont allow empty wildcard search Signed-off-by: Robin Appelman --- lib/private/Files/Cache/Cache.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index a966d621c5..672f3c97f4 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -598,6 +598,10 @@ class Cache implements ICache { // normalize pattern $pattern = $this->normalize($pattern); + if ($pattern === '%%') { + return []; + } + $sql = ' SELECT `fileid`, `storage`, `path`, `parent`, `name`,