StdinCredentials: increase maxCharacters to 8,192

This commit is contained in:
Nikolay Edigaryev 2026-02-23 15:28:28 +01:00
parent 8f8a24ad19
commit 0a5c747973
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ class StdinCredentials {
return (user, password)
}
private static func readStdinCredential(name: String, prompt: String, maxCharacters: Int = 1024, isSensitive: Bool) throws -> String {
private static func readStdinCredential(name: String, prompt: String, maxCharacters: Int = 8192, isSensitive: Bool) throws -> String {
var buf = [CChar](repeating: 0, count: maxCharacters + 1 /* sentinel */ + 1 /* NUL */)
guard let rawCredential = readpassphrase(prompt, &buf, buf.count, isSensitive ? RPP_ECHO_OFF : RPP_ECHO_ON) else {
throw StdinCredentialsError.CredentialRequired(which: name)