Skip to content

Commit f80222a

Browse files
Merge pull request #62849 from nextcloud/backport/62806/stable33
[stable33] fix: clear key password after loading key
2 parents 8ecbdb8 + 69f8190 commit f80222a

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

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

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

0 commit comments

Comments
 (0)