zrcadlo
https://github.com/nextcloud/server.git
synchronizováno 2024-08-21 17:55:33 +02:00
Verify that the encryption module exists before setting it
Tento commit je obsažen v:
rodič
e58029f8ad
revize
a09df6d453
@ -101,17 +101,17 @@ class Manager implements IManager {
|
||||
throw new Exceptions\ModuleAlreadyExistsException($id, $displayName);
|
||||
}
|
||||
|
||||
$defaultEncryptionModuleId = $this->getDefaultEncryptionModuleId();
|
||||
|
||||
if (empty($defaultEncryptionModuleId)) {
|
||||
$this->setDefaultEncryptionModule($id);
|
||||
}
|
||||
|
||||
$this->encryptionModules[$id] = [
|
||||
'id' => $id,
|
||||
'displayName' => $displayName,
|
||||
'callback' => $callback,
|
||||
];
|
||||
|
||||
$defaultEncryptionModuleId = $this->getDefaultEncryptionModuleId();
|
||||
|
||||
if (empty($defaultEncryptionModuleId)) {
|
||||
$this->setDefaultEncryptionModule($id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -182,6 +182,7 @@ class Manager implements IManager {
|
||||
*/
|
||||
public function setDefaultEncryptionModule($moduleId) {
|
||||
try {
|
||||
$this->getEncryptionModule($moduleId);
|
||||
$this->config->setAppValue('core', 'default_encryption_module', $moduleId);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
Načítá se…
Odkázat v novém úkolu
Zablokovat Uživatele