From b37b4ccad9e4d10f1c28d64acc25baa621ee749e Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 9 Oct 2013 15:56:21 +0200 Subject: [PATCH] only encrypt file to users with encryption keys Conflicts: apps/files_encryption/lib/stream.php --- apps/files_encryption/hooks/hooks.php | 2 -- apps/files_encryption/lib/stream.php | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 1103577ac64..5c16ef3f0c9 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -104,8 +104,6 @@ class Hooks { } // Encrypt existing user files: - // This serves to upgrade old versions of the encryption - // app (see appinfo/spec.txt) if ( $util->encryptAll('/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password']) ) { diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 08024b8090d..80ff87370ab 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -490,9 +490,10 @@ class Stream { // Get all users sharing the file includes current user $uniqueUserIds = $util->getSharingUsersArray($sharingEnabled, $this->relPath, $this->userId); + $checkedUserIds = $util->filterShareReadyUsers($uniqueUserIds); // Fetch public keys for all sharing users - $publicKeys = Keymanager::getPublicKeys($this->rootView, $uniqueUserIds); + $publicKeys = Keymanager::getPublicKeys($this->rootView, $checkedUserIds['ready']); // Encrypt enc key for all sharing users $this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys); -- 2.39.5