summaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-10-11 19:05:38 +0200
committerGitHub <noreply@github.com>2018-10-11 19:05:38 +0200
commitdd8350b3b3bb5f7cc923520066f907739e4e0734 (patch)
treefaf5ba616b29b21c108c3e8cb4ac4bf8df9e6281 /apps/encryption
parent12f921f0434ea67ceb5467eb933cb186454e2c2b (diff)
parent375f167c67ca60daf9d04b7dbbfdbb12937328a4 (diff)
downloadnextcloud-server-dd8350b3b3bb5f7cc923520066f907739e4e0734.tar.gz
nextcloud-server-dd8350b3b3bb5f7cc923520066f907739e4e0734.zip
Merge pull request #10778 from suntorytimed/patch-1
check for empty string
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/lib/Crypto/Crypt.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php
index 49b1bcb41aa..70c99f808ba 100644
--- a/apps/encryption/lib/Crypto/Crypt.php
+++ b/apps/encryption/lib/Crypto/Crypt.php
@@ -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) {