double log, I think not?

This commit is contained in:
Dane Everitt 2021-01-10 15:12:13 -08:00
parent b0fa9619de
commit 1e15beb953
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 1 additions and 7 deletions

View File

@ -62,12 +62,6 @@ func (r *Request) ValidateSftpCredentials(request SftpAuthRequest) (*SftpAuthRes
e := resp.Error()
if e != nil {
if resp.StatusCode >= 400 && resp.StatusCode < 500 {
log.WithFields(log.Fields{
"subsystem": "sftp",
"username": request.User,
"ip": request.IP,
}).Warn(e.Error())
return nil, &sftpInvalidCredentialsError{}
}

View File

@ -178,7 +178,7 @@ func (c *SFTPServer) passwordCallback(conn ssh.ConnMetadata, pass []byte) (*ssh.
if api.IsInvalidCredentialsError(err) {
logger.Warn("failed to validate user credentials (invalid username or password)")
} else {
logger.Error("encountered an error while trying to validate user credentials")
logger.WithField("error", err).Error("encountered an error while trying to validate user credentials")
}
return nil, err
}