Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-17 23:59:53 +0400
committerFlorin Peter <github@florin-peter.de>2013-05-17 23:59:53 +0400
commitcea9208ceccda86a33ec294926d39adecb962ed2 (patch)
tree5f6ef9b411d987cde99da020c3d11dc0a71fa470
parente7d1fe82aa21a1add52794f26260d8952a276773 (diff)
fix broken legacy tests
-rwxr-xr-xapps/files_encryption/lib/crypt.php4
-rwxr-xr-xapps/files_encryption/tests/crypt.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index 56dacc94b0c..046b4601b06 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -652,7 +652,7 @@ class Crypt {
return $legacyEncKey;
}
-
+
/**
* @brief encrypts content using legacy blowfish system
* @param $content the cleartext message you want to encrypt
@@ -683,7 +683,7 @@ class Crypt {
$decrypted = $bf->decrypt( $content );
- return $decrypted;
+ return rtrim($decrypted, "\0");;
}
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 69fd99d9a82..9737eefb96c 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -595,7 +595,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
*/
function testLegacyKeyRecryptKeyfileEncrypt( $crypted ) {
- $recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile( $crypted, $this->pass, $this->genPublicKey, $this->pass );
+ $recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile( $crypted, $this->pass, array($this->genPublicKey), $this->pass, '');
$this->assertNotEquals( $this->dataLong, $recrypted['data'] );