mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +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:
@@ -327,6 +327,13 @@ func Reload() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DelayLogin applies the configured login delay
|
||||
func DelayLogin(err error) {
|
||||
if Config.defender != nil {
|
||||
Config.defender.DelayLogin(err)
|
||||
}
|
||||
}
|
||||
|
||||
// IsBanned returns true if the specified IP address is banned
|
||||
func IsBanned(ip, protocol string) bool {
|
||||
if plugin.Handler.IsIPBanned(ip, protocol) {
|
||||
|
||||
Reference in New Issue
Block a user