From: Bjoern Schiessle Date: Tue, 4 Nov 2014 16:16:36 +0000 (+0100) Subject: still try to encrypt files, even if the session is not initialized. The stream wrappe... X-Git-Tag: v8.0.0alpha1~344^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0580c232d72123ca7e3c675ed73268099d00d185;p=nextcloud-server.git still try to encrypt files, even if the session is not initialized. The stream wrapper will throw an error which is better than silently continue. --- diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 3b9dcbe7767..31723ae7647 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -95,8 +95,7 @@ class Proxy extends \OC_FileProxy { // don't call the crypt stream wrapper, if... if ( - $session->getInitialized() !== Session::INIT_SUCCESSFUL // encryption successful initialized - || Crypt::mode() !== 'server' // we are not in server-side-encryption mode + Crypt::mode() !== 'server' // we are not in server-side-encryption mode || $this->isExcludedPath($path, $userId) // if path is excluded from encryption || substr($path, 0, 8) === 'crypt://' // we are already in crypt mode ) {