diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2018-08-15 19:08:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-15 19:08:11 +0200 |
commit | 853e55e31a7f123f920aafcf4d7c92fde5db157b (patch) | |
tree | b19cff053aeba5e414c0f32748fbc400713c4203 /core | |
parent | 294baf8e5d847ff85e2cf158c13dc02cc3c546ea (diff) | |
parent | 5b54b8cba2aa55ae4804086fc94086be9199708b (diff) | |
download | nextcloud-server-853e55e31a7f123f920aafcf4d7c92fde5db157b.tar.gz nextcloud-server-853e55e31a7f123f920aafcf4d7c92fde5db157b.zip |
Merge pull request #10646 from nextcloud/fix-password-reset-stable13
[stable13] only warn about data lose on password reset if per-user keys are used
Diffstat (limited to 'core')
-rw-r--r-- | core/Controller/LostController.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 5350dca0af6..ce98426084b 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -37,6 +37,7 @@ use OCP\AppFramework\Http\JSONResponse; use \OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Defaults; +use OCP\Encryption\IEncryptionModule; use OCP\Encryption\IManager; use \OCP\IURLGenerator; use \OCP\IRequest; @@ -259,7 +260,15 @@ class LostController extends Controller { } if ($this->encryptionManager->isEnabled() && !$proceed) { - return $this->error('', array('encryption' => true)); + $encryptionModules = $this->encryptionManager->getEncryptionModules(); + foreach ($encryptionModules as $module) { + /** @var IEncryptionModule $instance */ + $instance = call_user_func($module['callback']); + // this way we can find out whether per-user keys are used or a system wide encryption key + if ($instance->needDetailedAccessList()) { + return $this->error('', array('encryption' => true)); + } + } } try { |