summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-08-10 16:12:34 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-08-15 15:08:34 +0200
commitdfec66ca029efb04b7051c227db780860302fd12 (patch)
treea26aa680596d26c99e10630cf7d72c5cd94b7116 /core/Controller
parentf7ae4771c8b056c72dc0a68e0d62be7d2407c0d2 (diff)
downloadnextcloud-server-dfec66ca029efb04b7051c227db780860302fd12.tar.gz
nextcloud-server-dfec66ca029efb04b7051c227db780860302fd12.zip
only warn about data lose on password reset if per-user keys are used
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/LostController.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php
index d0ed432f03f..eacd5847c6c 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;
@@ -260,7 +261,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 {