From 376b99c7bd6764eaf5dc7f2254ffbe2c54bcf565 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 26 May 2026 20:39:11 +0200 Subject: [PATCH] fix: clear key password after loading key Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Auth/PublicKey/RSA.php | 1 + apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php index c39f0580c9779..dd336c205d2ca 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php @@ -70,6 +70,7 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = throw new \RuntimeException('unable to load private key'); } } + $auth->setPassword(''); $storage->setBackendOption('public_key_auth', $auth); } diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php index 30ff5dd2a4c21..231f042a63bf8 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php @@ -67,6 +67,8 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = throw new \RuntimeException('unable to load private key'); } } + + $auth->setPassword(''); $storage->setBackendOption('public_key_auth', $auth); } }