From 5e31ed4f526e943e695d994a6434ed71d1a45c1c Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Mon, 5 Dec 2022 15:26:36 +0100 Subject: [PATCH] Add comments Signed-off-by: Carl Schwan --- apps/files_external/lib/Lib/Auth/PublicKey/RSA.php | 1 + apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php | 1 + 2 files changed, 2 insertions(+) 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'); -- 2.39.5