]> 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>
Fri, 11 Oct 2013 08:51:24 +0000 (10:51 +0200)
Conflicts:
apps/files_encryption/lib/stream.php

apps/files_encryption/hooks/hooks.php
apps/files_encryption/lib/stream.php

index 1103577ac64d8ec0ec5afd14e4f9ee5d6d72e88a..5c16ef3f0c970cad59f1ed6921fcd653b2986636 100644 (file)
@@ -104,8 +104,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 08024b8090d37e750a3aa39ffdef547207856f45..80ff87370abd16024a49c5a5e414c7f837baf74d 100644 (file)
@@ -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);