Skip to content

Commit 82a5535

Browse files
authored
Merge pull request #62847 from nextcloud/backport/62806/stable31
[stable31] fix: clear key password after loading key
2 parents 4bf20fe + 86396b0 commit 82a5535

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
@@ -51,6 +51,7 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user =
5151
throw new \RuntimeException('unable to load private key');
5252
}
5353
}
54+
$auth->setPassword('');
5455
$storage->setBackendOption('public_key_auth', $auth);
5556
}
5657

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user =
4848
throw new \RuntimeException('unable to load private key');
4949
}
5050
}
51+
52+
$auth->setPassword('');
5153
$storage->setBackendOption('public_key_auth', $auth);
5254
}
5355
}

0 commit comments

Comments
 (0)