From 80f4df86cd85523ef0cde814c570db92831e4bf3 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 # Conflicts: # apps/files_external/lib/Lib/Auth/PublicKey/RSA.php # Conflicts: # apps/files_external/lib/Lib/Auth/PublicKey/RSA.php # apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php --- 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 12417b1bc854e..0bea6b79dcca1 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php @@ -67,6 +67,7 @@ public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = n 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 7d04aaaf05711..3b657604f0b3f 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php @@ -64,6 +64,8 @@ public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = n throw new \RuntimeException('unable to load private key'); } } + + $auth->setPassword(''); $storage->setBackendOption('public_key_auth', $auth); } }