]> source.dussan.org Git - nextcloud-server.git/commitdiff
only encrypt file to users with encryption keys
authorBjoern Schiessle <schiessle@owncloud.com>
Wed, 9 Oct 2013 13:56:21 +0000 (15:56 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Wed, 9 Oct 2013 13:56:21 +0000 (15:56 +0200)
apps/files_encryption/hooks/hooks.php
apps/files_encryption/lib/stream.php

index 2df860a8e5772d49526e3bf8ac32f13d0c1b3ee3..d9a76becf25cfbc7527b8830e01438cfd4c4d706 100644 (file)
@@ -92,8 +92,6 @@ class Hooks {
                        }\r
 \r
                        // Encrypt existing user files:\r
-                       // This serves to upgrade old versions of the encryption\r
-                       // app (see appinfo/spec.txt)\r
                        if (\r
                                $util->encryptAll('/' . $params['uid'] . '/' . 'files', $session->getLegacyKey(), $params['password'])\r
                        ) {\r
index 02955bb064e982b9020a90b788021e95c59011a0..b25ba7bb6778ed1bdc7cb4caa251bf126089c0dd 100644 (file)
@@ -506,9 +506,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);