Browse Source
Letting password enable auth bypass caPublicKey (only if passauth is … (#20022)
pull/20030/head
Sveinn
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
1 deletions
-
cmd/sftp-server.go
|
|
@ -161,11 +161,13 @@ internalAuth: |
|
|
|
return nil, errNoSuchUser |
|
|
|
} |
|
|
|
|
|
|
|
if caPublicKey != nil { |
|
|
|
if caPublicKey != nil && pass == nil { |
|
|
|
|
|
|
|
err := validateKey(c, key) |
|
|
|
if err != nil { |
|
|
|
return nil, errAuthentication |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// Temporary credentials are not allowed.
|
|
|
|