From e7ff84df5cac2a7917360c316f817f754ce8e5a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Tue, 5 Jan 2016 16:34:40 +0100 Subject: [PATCH] always use default cipher for write operations, no matter how the file was encrypted before --- apps/encryption/lib/crypto/encryption.php | 6 +++--- 1 file 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 -- 2.39.5