mirror of
https://github.com/nextcloud/server.git
synced 2026-05-25 02:34:12 -04:00
backport of #10778
Adding a check to see if keyFileContents is empty: * this fixes a download error and an exception if the data content for encryption is empty * #3958: for recovering encrypted files with a damaged signature this is necessary in addition to turning the signature check off Signed-off-by: Stefan Weiberg <sweiberg@suse.com>
This commit is contained in:
parent
feb8a795ea
commit
e8db4017b8
1 changed files with 4 additions and 0 deletions
|
|
@ -457,6 +457,10 @@ class Crypt {
|
|||
* @throws DecryptionFailedException
|
||||
*/
|
||||
public function symmetricDecryptFileContent($keyFileContents, $passPhrase, $cipher = self::DEFAULT_CIPHER, $version = 0, $position = 0) {
|
||||
if ($keyFileContents == '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
$catFile = $this->splitMetaData($keyFileContents, $cipher);
|
||||
|
||||
if ($catFile['signature'] !== false) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue