summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-10-09 15:56:21 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-10-09 15:56:21 +0200
commit38e5da05afede2e6dcd5465f47b3e4576ad37d64 (patch)
treee0fc6f203e7a70184b12c9864d547b994b8e3fc1 /apps/files_encryption
parentb4df4cc61d897703176b0ca5cad7fa687ddd059b (diff)
downloadnextcloud-server-38e5da05afede2e6dcd5465f47b3e4576ad37d64.tar.gz
nextcloud-server-38e5da05afede2e6dcd5465f47b3e4576ad37d64.zip
only encrypt file to users with encryption keys
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/hooks/hooks.php2
-rw-r--r--apps/files_encryption/lib/stream.php3
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 2df860a8e57..d9a76becf25 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -92,8 +92,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 02955bb064e..b25ba7bb677 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -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);