diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-06-25 16:50:10 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-07-05 16:13:22 +0200 |
commit | 5c5a8a0ebac2a130d655c690818f58048bfb3a12 (patch) | |
tree | 8bff0bd871043032eaed0b82f64a63ef84995f4d /apps/files_encryption/hooks/hooks.php | |
parent | 7bc153a87a6b603b3e96edf0de50243ad3f3a76f (diff) | |
download | nextcloud-server-5c5a8a0ebac2a130d655c690818f58048bfb3a12.tar.gz nextcloud-server-5c5a8a0ebac2a130d655c690818f58048bfb3a12.zip |
only escape glob pattern
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 96f06b154f8..c26119b6c2e 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -497,7 +497,8 @@ class Hooks { // handle share-keys
$localKeyPath = $view->getLocalFile($baseDir . 'share-keys/' . $params['oldpath']);
- $matches = glob(preg_quote($localKeyPath) . '*.shareKey');
+ $escapedPath = preg_replace('/(\*|\?|\[)/', '[$1]', $localKeyPath);
+ $matches = glob($escapedPath . '*.shareKey');
foreach ($matches as $src) {
$dst = \OC\Files\Filesystem::normalizePath(str_replace($params['oldpath'], $params['newpath'], $src));
|