Skip to content

Commit 20ff5b1

Browse files
authored
Merge pull request #62845 from nextcloud/backport/62806/stable29
[stable29] fix: clear key password after loading key
2 parents 28d1178 + 376b99c commit 20ff5b1

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
@@ -70,6 +70,7 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user =
7070
throw new \RuntimeException('unable to load private key');
7171
}
7272
}
73+
$auth->setPassword('');
7374
$storage->setBackendOption('public_key_auth', $auth);
7475
}
7576

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user =
6767
throw new \RuntimeException('unable to load private key');
6868
}
6969
}
70+
71+
$auth->setPassword('');
7072
$storage->setBackendOption('public_key_auth', $auth);
7173
}
7274
}

0 commit comments

Comments
 (0)