mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
defender: allow to impose a delay between login attempts
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -821,6 +821,7 @@ func (s *httpdServer) loginAdmin(
|
||||
return
|
||||
}
|
||||
dataprovider.UpdateAdminLastLogin(admin)
|
||||
common.DelayLogin(nil)
|
||||
redirectURL := webUsersPath
|
||||
if errorFunc == nil {
|
||||
redirectURL = webAdminMFAPath
|
||||
@@ -1000,6 +1001,7 @@ func (s *httpdServer) generateAndSendToken(w http.ResponseWriter, r *http.Reques
|
||||
}
|
||||
|
||||
dataprovider.UpdateAdminLastLogin(&admin)
|
||||
common.DelayLogin(nil)
|
||||
render.JSON(w, r, resp)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user