[Pkg-owncloud-commits] [owncloud] 47/62: only try to determine unencrypted size if a encrypted file is read

David Prévot taffit at moszumanska.debian.org
Tue Jun 23 23:39:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.5beta
in repository owncloud.

commit 48c17d27453c1f0018b5b194496da2fb5189fdab
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Wed Jun 17 19:44:57 2015 +0200

    only try to determine unencrypted size if a encrypted file is read
---
 apps/files_encryption/lib/proxy.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 07fd878..1277e68 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -299,7 +299,10 @@ class Proxy extends \OC_FileProxy {
 	public function postGetFileInfo($path, $data) {
 
 		// if path is a folder do nothing
-		if (\OCP\App::isEnabled('files_encryption') && $data !== false && array_key_exists('size', $data)) {
+		if (\OCP\App::isEnabled('files_encryption') &&
+			$data !== false &&
+			array_key_exists('size', $data) &&
+			$this->shouldEncrypt($path)) {
 
 			// Disable encryption proxy to prevent recursive calls
 			$proxyStatus = \OC_FileProxy::$enabled;
@@ -330,7 +333,8 @@ class Proxy extends \OC_FileProxy {
 		// if encryption is no longer enabled or if the files aren't migrated yet
 		// we return the default file size
 		if(!\OCP\App::isEnabled('files_encryption') ||
-				$util->getMigrationStatus() !== Util::MIGRATION_COMPLETED) {
+				$util->getMigrationStatus() !== Util::MIGRATION_COMPLETED ||
+				!$this->shouldEncrypt($path)) {
 			return $size;
 		}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list