[Pkg-owncloud-commits] [owncloud] 109/215: Merge pull request #15860 from owncloud/enc_fallback_old_encryption
David Prévot
taffit at moszumanska.debian.org
Tue May 5 01:01:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 678b7d7e4d042ede16261c7eae659b10e597fd55
Merge: 93c25a1 27683f9
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Mon Apr 27 14:32:19 2015 +0200
Merge pull request #15860 from owncloud/enc_fallback_old_encryption
[encryption] handle encrypted files correctly which where encrypted with a old version of ownCloud (<=oc6)
apps/encryption/lib/crypto/crypt.php | 9 ++++++++
apps/encryption/lib/crypto/encryption.php | 14 ++++++++---
.../encryption/tests/lib/crypto/encryptionTest.php | 27 ++++++++++++++++++++++
apps/encryption_dummy/lib/dummymodule.php | 3 ++-
lib/private/files/storage/wrapper/encryption.php | 26 ++++++++++++++++-----
lib/private/files/stream/encryption.php | 24 ++++++++++++-------
lib/public/encryption/iencryptionmodule.php | 3 ++-
tests/lib/files/stream/encryption.php | 2 +-
8 files changed, 88 insertions(+), 20 deletions(-)
diff --cc lib/private/files/storage/wrapper/encryption.php
index af48d34,5e96f50..e3458cb
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@@ -311,13 -313,17 +313,15 @@@ class Encryption extends Wrapper
|| $mode === 'wb'
|| $mode === 'wb+'
) {
- if (!empty($encryptionModuleId)) {
+ if ($encryptionEnabled) {
+ // if $encryptionModuleId is empty, the default module will be used
$encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
$shouldEncrypt = $encryptionModule->shouldEncrypt($fullPath);
- } elseif ($encryptionEnabled) {
- $encryptionModule = $this->encryptionManager->getDefaultEncryptionModule();
- $shouldEncrypt = $encryptionModule->shouldEncrypt($fullPath);
}
} else {
+ $info = $this->getCache()->get($path);
// only get encryption module if we found one in the header
+ // or if file should be encrypted according to the file cache
if (!empty($encryptionModuleId)) {
$encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId);
$shouldEncrypt = true;
--
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