double log, I think not?
This commit is contained in:
parent
b0fa9619de
commit
1e15beb953
|
@ -62,12 +62,6 @@ func (r *Request) ValidateSftpCredentials(request SftpAuthRequest) (*SftpAuthRes
|
||||||
e := resp.Error()
|
e := resp.Error()
|
||||||
if e != nil {
|
if e != nil {
|
||||||
if resp.StatusCode >= 400 && resp.StatusCode < 500 {
|
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{}
|
return nil, &sftpInvalidCredentialsError{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ func (c *SFTPServer) passwordCallback(conn ssh.ConnMetadata, pass []byte) (*ssh.
|
||||||
if api.IsInvalidCredentialsError(err) {
|
if api.IsInvalidCredentialsError(err) {
|
||||||
logger.Warn("failed to validate user credentials (invalid username or password)")
|
logger.Warn("failed to validate user credentials (invalid username or password)")
|
||||||
} else {
|
} 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
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user