aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-08-08 16:52:32 +0200
committerGitHub <noreply@github.com>2023-08-08 16:52:32 +0200
commite232cd8158ceb46c500785792920b8f399f6d594 (patch)
treea2eb076fa98c853e2c1b25a9960bc203d366be00 /apps/settings
parentbbd0deb80af6492446470110a36d1010d5d4787e (diff)
parent3e176f58af0e81588b20363dc36a295001284fc9 (diff)
downloadnextcloud-server-e232cd8158ceb46c500785792920b8f399f6d594.tar.gz
nextcloud-server-e232cd8158ceb46c500785792920b8f399f6d594.zip
Merge pull request #39065 from nextcloud/fix/remove-ilogger-uses-in-encryption
Migrate away from ILogger in encryption
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Controller/ChangePasswordController.php32
1 files changed, 2 insertions, 30 deletions
diff --git a/apps/settings/lib/Controller/ChangePasswordController.php b/apps/settings/lib/Controller/ChangePasswordController.php
index 20ec28220a5..10ad11935c6 100644
--- a/apps/settings/lib/Controller/ChangePasswordController.php
+++ b/apps/settings/lib/Controller/ChangePasswordController.php
@@ -171,36 +171,8 @@ class ChangePasswordController extends Controller {
if ($this->appManager->isEnabledForUser('encryption')) {
//handle the recovery case
- $crypt = new \OCA\Encryption\Crypto\Crypt(
- \OC::$server->getLogger(),
- \OC::$server->getUserSession(),
- \OC::$server->getConfig(),
- \OC::$server->getL10N('encryption'));
- $keyStorage = \OC::$server->getEncryptionKeyStorage();
- $util = new \OCA\Encryption\Util(
- new \OC\Files\View(),
- $crypt,
- \OC::$server->getLogger(),
- \OC::$server->getUserSession(),
- \OC::$server->getConfig(),
- \OC::$server->getUserManager());
- $keyManager = new \OCA\Encryption\KeyManager(
- $keyStorage,
- $crypt,
- \OC::$server->getConfig(),
- \OC::$server->getUserSession(),
- new \OCA\Encryption\Session(\OC::$server->getSession()),
- \OC::$server->getLogger(),
- $util,
- \OC::$server->getLockingProvider()
- );
- $recovery = new \OCA\Encryption\Recovery(
- \OC::$server->getUserSession(),
- $crypt,
- $keyManager,
- \OC::$server->getConfig(),
- \OC::$server->getEncryptionFilesHelper(),
- new \OC\Files\View());
+ $keyManager = \OCP\Server::get(\OCA\Encryption\KeyManager::class);
+ $recovery = \OCP\Server::get(\OCA\Encryption\Recovery::class);
$recoveryAdminEnabled = $recovery->isRecoveryKeyEnabled();
$validRecoveryPassword = false;