mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
move other errors to utils package
This commit is contained in:
@@ -845,7 +845,7 @@ func updateLoginMetrics(user *dataprovider.User, ip, method string, err error) {
|
||||
// record failed login key auth only once for session if the
|
||||
// authentication fails in checkAuthError
|
||||
event := common.HostEventLoginFailed
|
||||
if _, ok := err.(*dataprovider.RecordNotFoundError); ok {
|
||||
if _, ok := err.(*utils.RecordNotFoundError); ok {
|
||||
event = common.HostEventUserNotFound
|
||||
}
|
||||
common.AddDefenderEvent(ip, event)
|
||||
|
||||
Reference in New Issue
Block a user