only warn about data lose on password reset if per-user keys are used
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
f7ae4771c8
commit
dfec66ca02
|
@ -37,6 +37,7 @@ use OCP\AppFramework\Http\JSONResponse;
|
||||||
use \OCP\AppFramework\Http\TemplateResponse;
|
use \OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\AppFramework\Utility\ITimeFactory;
|
use OCP\AppFramework\Utility\ITimeFactory;
|
||||||
use OCP\Defaults;
|
use OCP\Defaults;
|
||||||
|
use OCP\Encryption\IEncryptionModule;
|
||||||
use OCP\Encryption\IManager;
|
use OCP\Encryption\IManager;
|
||||||
use \OCP\IURLGenerator;
|
use \OCP\IURLGenerator;
|
||||||
use \OCP\IRequest;
|
use \OCP\IRequest;
|
||||||
|
@ -260,7 +261,15 @@ class LostController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->encryptionManager->isEnabled() && !$proceed) {
|
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 {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue