diff options
author | Björn Schießle <bjoern@schiessle.org> | 2016-01-05 16:34:40 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-02-09 23:43:25 +0100 |
commit | e7ff84df5cac2a7917360c316f817f754ce8e5a4 (patch) | |
tree | 36d4bbd3f3c81c99b82b4ee93ac9268ae8ce9724 /apps/encryption | |
parent | cf3a8f274f05170b69cb3872d0d8c9045a5876d3 (diff) | |
download | nextcloud-server-e7ff84df5cac2a7917360c316f817f754ce8e5a4.tar.gz nextcloud-server-e7ff84df5cac2a7917360c316f817f754ce8e5a4.zip |
always use default cipher for write operations, no matter how the file was encrypted before
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/lib/crypto/encryption.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php index 4843284f7a3..dc60c094784 100644 --- a/apps/encryption/lib/crypto/encryption.php +++ b/apps/encryption/lib/crypto/encryption.php @@ -192,10 +192,10 @@ class Encryption implements IEncryptionModule { } } - if (isset($header['cipher'])) { - $this->cipher = $header['cipher']; - } elseif ($this->isWriteOperation) { + if ($this->isWriteOperation) { $this->cipher = $this->crypt->getCipher(); + } elseif (isset($header['cipher'])) { + $this->cipher = $header['cipher']; } else { // if we read a file without a header we fall-back to the legacy cipher // which was used in <=oC6 |