mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Add comments
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit 5e31ed4f52)
This commit is contained in:
parent
40f01de456
commit
1c558d2f15
2 changed files with 2 additions and 0 deletions
|
|
@ -60,6 +60,7 @@ class RSA extends AuthMechanism {
|
|||
$auth = new RSACrypt();
|
||||
$auth->setPassword($this->config->getSystemValue('secret', ''));
|
||||
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
|
||||
// Add fallback routine for a time where secret was not enforced to be exists
|
||||
$auth->setPassword('');
|
||||
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
|
||||
throw new \RuntimeException('unable to load private key');
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class RSAPrivateKey extends AuthMechanism {
|
|||
$auth = new RSACrypt();
|
||||
$auth->setPassword($this->config->getSystemValue('secret', ''));
|
||||
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
|
||||
// Add fallback routine for a time where secret was not enforced to be exists
|
||||
$auth->setPassword('');
|
||||
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
|
||||
throw new \RuntimeException('unable to load private key');
|
||||
|
|
|
|||
Loading…
Reference in a new issue