mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
always use default cipher for write operations, no matter how the file was encrypted before
This commit is contained in:
parent
cf3a8f274f
commit
e7ff84df5c
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue