From 6cc147c20cd52e3e1637e8c76fd18d866470ab58 Mon Sep 17 00:00:00 2001 From: Andrew Summers <18727110+summersab@users.noreply.github.com> Date: Tue, 29 Aug 2023 18:01:47 -0500 Subject: [PATCH 1/2] Refactor `OC\Server::getEncryptionKeyStorage` Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com> --- lib/private/Encryption/EncryptionWrapper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index a6bc72ef18f8e..0082248311dec 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -28,6 +28,7 @@ use OC\Files\Storage\Wrapper\Encryption; use OC\Files\View; use OC\Memcache\ArrayCache; +use OCP\Encryption\Keys\IStorage; use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage\IDisableEncryptionStorage; use OCP\Files\Storage\IStorage; @@ -82,7 +83,7 @@ public function wrapStorage(string $mountPoint, IStorage $storage, IMountPoint $ $mountManager = Filesystem::getMountManager(); $uid = $user ? $user->getUID() : null; $fileHelper = \OC::$server->getEncryptionFilesHelper(); - $keyStorage = \OC::$server->getEncryptionKeyStorage(); + $keyStorage = \OC::$server->get(IStorage::class); $util = new Util( new View(), From deaaa4beb6991a201bdd8cd65f406f43c040953b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 30 May 2024 14:42:36 +0200 Subject: [PATCH 2/2] chore: adjust conflicting php class name usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benjamin Gaussorgues Signed-off-by: John Molakvoæ --- lib/private/Encryption/EncryptionWrapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index 0082248311dec..ffc92eef90e12 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -28,7 +28,7 @@ use OC\Files\Storage\Wrapper\Encryption; use OC\Files\View; use OC\Memcache\ArrayCache; -use OCP\Encryption\Keys\IStorage; +use OCP\Encryption\Keys\IStorage as EncryptionKeysStorage; use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage\IDisableEncryptionStorage; use OCP\Files\Storage\IStorage; @@ -83,7 +83,7 @@ public function wrapStorage(string $mountPoint, IStorage $storage, IMountPoint $ $mountManager = Filesystem::getMountManager(); $uid = $user ? $user->getUID() : null; $fileHelper = \OC::$server->getEncryptionFilesHelper(); - $keyStorage = \OC::$server->get(IStorage::class); + $keyStorage = \OC::$server->get(EncryptionKeysStorage::class); $util = new Util( new View(),