diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-01 16:35:46 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:30 +0200 |
commit | c9d6ed3d7d04412b721745f61402ff1400c59aeb (patch) | |
tree | 2cd987f165ab703d9be00e88005ae058221544ea /lib/private | |
parent | de4ec21c3948f86685450269a1857473babc4a56 (diff) | |
download | nextcloud-server-c9d6ed3d7d04412b721745f61402ff1400c59aeb.tar.gz nextcloud-server-c9d6ed3d7d04412b721745f61402ff1400c59aeb.zip |
in case the file exists we require the explicit module as specified in the file header - otherwise we need to fail hard to prevent data loss on client side
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 3e980984191..09ba090acff 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -219,6 +219,12 @@ class Encryption extends Wrapper { $size = $unencryptedSize = 0; if ($this->file_exists($path)) { + // in case the file exists we require the explicit module as + // specified in the file header - otherwise we need to fail hard to + // prevent data loss on client side + if (!empty($encryptionModuleId)) { + $encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId); + } $size = $this->storage->filesize($path); $unencryptedSize = $this->filesize($path); } |