aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/proxy.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-27 07:39:03 -0800
committerVincent Petry <pvince81@owncloud.com>2013-11-27 07:39:03 -0800
commit40231c08cf617b5909dee778372d6b1b8cdd5bcf (patch)
tree52e081bc8577f78505ea80fc7158eb9235c7ed59 /apps/files_encryption/lib/proxy.php
parent5b7b0536346a4a6608e0b294b6784ac5ff3b142a (diff)
parent9fb71af98850ad6638c4238ae0938972a9f23b50 (diff)
downloadnextcloud-server-40231c08cf617b5909dee778372d6b1b8cdd5bcf.tar.gz
nextcloud-server-40231c08cf617b5909dee778372d6b1b8cdd5bcf.zip
Merge pull request #5977 from owncloud/encryption_enable_public_upload
Encryption enable public upload
Diffstat (limited to 'apps/files_encryption/lib/proxy.php')
-rw-r--r--apps/files_encryption/lib/proxy.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 7a2fcf7233d..5ba3bfa784f 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -47,8 +47,10 @@ class Proxy extends \OC_FileProxy {
*/
private static function shouldEncrypt($path) {
+ $userId = Helper::getUser($path);
+
if (\OCP\App::isEnabled('files_encryption') === false || Crypt::mode() !== 'server' ||
- strpos($path, '/' . \OCP\User::getUser() . '/files') !== 0) {
+ strpos($path, '/' . $userId . '/files') !== 0) {
return false;
}
@@ -244,9 +246,6 @@ class Proxy extends \OC_FileProxy {
// split the path parts
$pathParts = explode('/', $path);
- // get relative path
- $relativePath = \OCA\Encryption\Helper::stripUserFilesPath($path);
-
// FIXME: handling for /userId/cache used by webdav for chunking. The cache chunks are NOT encrypted
if (isset($pathParts[2]) && $pathParts[2] === 'cache') {
return $result;