summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/proxy.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-10-02 12:55:46 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-10-06 12:02:08 +0200
commit9147219377d6fec5666a03943be1892253750871 (patch)
tree6a415f052231554fb2a120f69a1a00e7db5e8089 /apps/files_encryption/lib/proxy.php
parent537f046e66b16aa98c7b9fcf60e767e9f861f342 (diff)
downloadnextcloud-server-9147219377d6fec5666a03943be1892253750871.tar.gz
nextcloud-server-9147219377d6fec5666a03943be1892253750871.zip
we also encrypt/decrypt files in the versions folder for previews and if encryption is enabled/disabled
Diffstat (limited to 'apps/files_encryption/lib/proxy.php')
-rw-r--r--apps/files_encryption/lib/proxy.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index b406404a688..3b9dcbe7767 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -49,12 +49,17 @@ class Proxy extends \OC_FileProxy {
* @param string $uid user
* @return boolean
*/
- private function isExcludedPath($path, $uid) {
+ protected function isExcludedPath($path, $uid) {
$view = new \OC\Files\View();
- // files outside of the files-folder are excluded
- if(strpos($path, '/' . $uid . '/files/') !== 0) {
+ $path = \OC\Files\Filesystem::normalizePath($path);
+
+ // we only encrypt/decrypt files in the files and files_versions folder
+ if(
+ strpos($path, '/' . $uid . '/files/') !== 0 &&
+ strpos($path, '/' . $uid . '/files_versions/') !== 0) {
+
return true;
}