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

Conversation

@suntorytimed
Copy link
Contributor

@suntorytimed suntorytimed commented Oct 11, 2018

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

Backport of #10778

@suntorytimed
Copy link
Contributor Author

@suntorytimed suntorytimed commented Oct 11, 2018

@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 requested a review from schiessle Oct 12, 2018
@@ -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 '';
}

This comment has been minimized.

@MorrisJobke

MorrisJobke Oct 15, 2018
Member

Could you fix the indentation? Then this is good to go in 👍

@rullzer rullzer force-pushed the suntorytimed:stable14 branch from 9a02574 to 28dcd33 Oct 24, 2018
@rullzer
Copy link
Member

@rullzer 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>
@rullzer rullzer force-pushed the suntorytimed:stable14 branch from 28dcd33 to e8db401 Oct 24, 2018
Copy link
Member

@ChristophWurst ChristophWurst left a comment

👍 except for the 3rdparty change ;)

Copy link
Member

@ChristophWurst ChristophWurst left a comment

👍 thanks

@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
1 check failed
1 check failed
continuous-integration/drone/pr the build failed
Details
@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants