diff --git a/apps/encryption/lib/Command/DropLegacyFileKey.php b/apps/encryption/lib/Command/DropLegacyFileKey.php index c9f6e9440e2..17349d66b91 100644 --- a/apps/encryption/lib/Command/DropLegacyFileKey.php +++ b/apps/encryption/lib/Command/DropLegacyFileKey.php @@ -85,7 +85,7 @@ class DropLegacyFileKey extends Command { $output->writeln('' . $path . ' does not have a proper header'); } else { try { - $legacyFileKey = $this->keyManager->getFileKey($path, null, true); + $legacyFileKey = $this->keyManager->getFileKey($path, true); if ($legacyFileKey === '') { $output->writeln('Got an empty legacy filekey for ' . $path . ', continuing', OutputInterface::VERBOSITY_VERBOSE); continue; diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 04fee2fd92a..c4c598f0229 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -437,7 +437,7 @@ class Encryption implements IEncryptionModule { * @throws DecryptionFailedException */ public function isReadable($path, $uid) { - $fileKey = $this->keyManager->getFileKey($path, $uid, null); + $fileKey = $this->keyManager->getFileKey($path, null); if (empty($fileKey)) { $owner = $this->util->getOwner($path); if ($owner !== $uid) { diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php index 4c69531aba1..384bda689ba 100644 --- a/apps/encryption/lib/Recovery.php +++ b/apps/encryption/lib/Recovery.php @@ -182,7 +182,7 @@ class Recovery { if ($item['type'] === 'dir') { $this->addRecoveryKeys($filePath . '/'); } else { - $fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID(), null); + $fileKey = $this->keyManager->getFileKey($filePath, null); if (!empty($fileKey)) { $accessList = $this->file->getAccessList($filePath); $publicKeys = []; diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index afdfff9bc8a..a0e2f154d3d 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -248,7 +248,7 @@ class EncryptionTest extends TestCase { ->willReturn(true); $this->keyManagerMock->expects($this->once()) ->method('getFileKey') - ->with($path, null, null, true) + ->with($path, null, true) ->willReturn($fileKey); $this->instance->begin($path, 'user', 'r', [], []); diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index 8afcf7ee7e5..c0f81da39cd 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -443,7 +443,7 @@ class KeyManagerTest extends TestCase { } $this->assertSame($expected, - $this->instance->getFileKey($path, null, null) + $this->instance->getFileKey($path, null) ); }