diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php index 199fdfcc6d6e4..d45db03b2da63 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 @@ public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = n $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 26cf0501eb649..7d04aaaf05711 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 @@ public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = n $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');