Skip to content
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

Merged
merged 1 commit into from
Oct 24, 2018
Merged

[stable14] check for empty string #11783

merged 1 commit into from
Oct 24, 2018

Conversation

suntorytimed
Copy link
Contributor

@suntorytimed suntorytimed commented Oct 11, 2018

Adding a check to see if keyFileContents is empty:

Backport of #10778

@suntorytimed
Copy link
Contributor Author

@schiessle @rullzer as requested the backport of #10778 to stable14

@rullzer rullzer added this to the Nextcloud 14.0.4 milestone Oct 11, 2018
@rullzer rullzer added the 3. to review Waiting for reviews label Oct 11, 2018
@rullzer rullzer requested a review from schiessle October 12, 2018 10:29
@@ -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 '';
}
Copy link
Member

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 👍

@rullzer
Copy link
Member

rullzer commented Oct 24, 2018

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>
Copy link
Member

@ChristophWurst ChristophWurst left a 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 ;)

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 24, 2018
@ChristophWurst ChristophWurst changed the title backport of #10778 [stable14] backport of #10778 Oct 24, 2018
@MorrisJobke MorrisJobke merged commit cdca81b into nextcloud:stable14 Oct 24, 2018
@MorrisJobke MorrisJobke mentioned this pull request Nov 13, 2018
@MorrisJobke MorrisJobke changed the title [stable14] backport of #10778 [stable14] check for empty string Nov 13, 2018
@MorrisJobke MorrisJobke mentioned this pull request Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants