Skip to content

Commit f6b6541

Browse files
committed
fix: clear key password after loading key
Signed-off-by: Robin Appelman <robin@icewind.nl> # 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
1 parent 39996b5 commit f6b6541

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

apps/files_external/lib/Lib/Auth/PublicKey/RSA.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user =
5959
if (!$auth instanceof RSACrypt\PrivateKey) {
6060
throw new \RuntimeException('Loaded key is not a private key');
6161
}
62+
$auth = $auth->withPassword('');
6263
$storage->setBackendOption('public_key_auth', $auth);
6364
}
6465

apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user =
6161
if (!$auth instanceof RSA\PrivateKey) {
6262
throw new \RuntimeException('Loaded key is not a private key');
6363
}
64+
65+
$auth = $auth->withPassword('');
6466
$storage->setBackendOption('public_key_auth', $auth);
6567
}
6668
}

0 commit comments

Comments
 (0)