From: Björn Schießle Date: Tue, 26 Mar 2013 11:40:31 +0000 (+0100) Subject: get the correct paths and owner to access shared files X-Git-Tag: v6.0.0alpha2~743^2~205 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5f233ee8140476d02e1c20325b83362c0d54d237;p=nextcloud-server.git get the correct paths and owner to access shared files --- diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 4dc2bfd7491..7c981d4fc44 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -227,11 +227,10 @@ class Proxy extends \OC_FileProxy { $privateKey = $session->getPrivateKey( $userId ); // Get the file owner so we can retrieve its keyfile - $fileOwner = \OC\Files\Filesystem::getOwner( $relPath ); //NOTE: This might be false! make sure the path passed to it is right - $fileOwner = 'admin'; // FIXME: Manually set the correct UID for now - + list($fileOwner, $ownerPath) = $util->getUidAndFilename($relPath); + // Get the encrypted keyfile - $encKeyfile = Keymanager::getFileKey( $view, $fileOwner, $relPath ); + $encKeyfile = Keymanager::getFileKey( $view, $fileOwner, $ownerPath ); // Attempt to fetch the user's shareKey $shareKey = Keymanager::getShareKey( $view, $userId, $relPath );