summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/proxy.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-11-21 00:23:38 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-11-21 00:23:38 +0100
commitb27fc42e1f0fbd1edebb1eb1818de4b4e0c4ee4b (patch)
tree6e66949a72e8471a01817ff05851b65aec6ef8f0 /apps/files_encryption/lib/proxy.php
parent318db64b2d9f724c3209bd6ca97f560840e2cc20 (diff)
downloadnextcloud-server-b27fc42e1f0fbd1edebb1eb1818de4b4e0c4ee4b.tar.gz
nextcloud-server-b27fc42e1f0fbd1edebb1eb1818de4b4e0c4ee4b.zip
public upload now also works with encryption enabled
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 f7253b4591b..43d451d67c8 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;