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

Conversation

Projects
None yet
4 participants
@suntorytimed
Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

rullzer commented Oct 24, 2018

I took the liberty of fixing the indentation

@MorrisJobke pleae review

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>

@rullzer rullzer force-pushed the suntorytimed:stable14 branch from 28dcd33 to e8db401 Oct 24, 2018

@ChristophWurst

👍 except for the 3rdparty change ;)

@ChristophWurst

👍 thanks

@ChristophWurst ChristophWurst changed the title from backport of #10778 to [stable14] backport of #10778 Oct 24, 2018

@MorrisJobke MorrisJobke merged commit cdca81b into nextcloud:stable14 Oct 24, 2018

1 check failed

continuous-integration/drone/pr the build failed
Details

@MorrisJobke MorrisJobke referenced this pull request Nov 13, 2018

Merged

14.0.4 RC 1 #12436

@MorrisJobke MorrisJobke changed the title from [stable14] backport of #10778 to [stable14] check for empty string Nov 13, 2018

@MorrisJobke MorrisJobke referenced this pull request Nov 22, 2018

Merged

14.0.4 #12586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment