-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[stable14] check for empty string #11783
Conversation
@schiessle @rullzer as requested the backport of #10778 to stable14 |
apps/encryption/lib/Crypto/Crypt.php
Outdated
@@ -457,6 +457,10 @@ protected function isValidPrivateKey($plainKey) { | |||
* @throws DecryptionFailedException | |||
*/ | |||
public function symmetricDecryptFileContent($keyFileContents, $passPhrase, $cipher = self::DEFAULT_CIPHER, $version = 0, $position = 0) { | |||
if ($keyFileContents == '') { | |||
return ''; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you fix the indentation? Then this is good to go in 👍
I took the liberty of fixing the indentation @MorrisJobke pleae review |
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 except for the 3rdparty change ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks
Adding a check to see if keyFileContents is empty:
for encryption is empty
this is necessary in addition to turning the signature check off
Backport of #10778