diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-12-05 15:26:36 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-12-05 15:26:36 +0100 |
commit | 5e31ed4f526e943e695d994a6434ed71d1a45c1c (patch) | |
tree | 57801c4be6cf806181a146d5f5781f956f786ae7 | |
parent | 754cb58b1259a58f626d47c2193b92c651d3b2d8 (diff) | |
download | nextcloud-server-5e31ed4f526e943e695d994a6434ed71d1a45c1c.tar.gz nextcloud-server-5e31ed4f526e943e695d994a6434ed71d1a45c1c.zip |
Add comments
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
-rw-r--r-- | apps/files_external/lib/Lib/Auth/PublicKey/RSA.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php index 199fdfcc6d6..d45db03b2da 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php @@ -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'); diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php index 26cf0501eb6..7d04aaaf057 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php @@ -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'); |