always use default cipher for write operations, no matter how the file was encrypted before

This commit is contained in:
Björn Schießle 2016-01-05 16:34:40 +01:00 committed by Lukas Reschke
parent cf3a8f274f
commit e7ff84df5c

View file

@ -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