Letting password enable auth bypass caPublicKey (only if passauth is … (#20022)

This commit is contained in:
Sveinn 2024-07-01 22:02:01 +00:00 committed by GitHub
parent f7ff19cb18
commit e404abf103
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,11 +161,13 @@ internalAuth:
return nil, errNoSuchUser return nil, errNoSuchUser
} }
if caPublicKey != nil { if caPublicKey != nil && pass == nil {
err := validateKey(c, key) err := validateKey(c, key)
if err != nil { if err != nil {
return nil, errAuthentication return nil, errAuthentication
} }
} else { } else {
// Temporary credentials are not allowed. // Temporary credentials are not allowed.