mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
always show banned host in ui
When an host is banned but the updated_time field is in the past the ui didn't show the record. Fixes #758 Signed-off-by: lucatiozzo91 <luca.tiozzo91@gmail.com>
This commit is contained in:
committed by
Nicola Murino
parent
8502d7b051
commit
7b86e2ac59
@@ -47,7 +47,7 @@ func getAddDefenderEventQuery() string {
|
||||
}
|
||||
|
||||
func getDefenderHostsQuery() string {
|
||||
return fmt.Sprintf(`SELECT id,ip,ban_time FROM %v WHERE updated_at >= %v ORDER BY updated_at DESC LIMIT %v`,
|
||||
return fmt.Sprintf(`SELECT id,ip,ban_time FROM %v WHERE updated_at >= %v OR ban_time > 0 ORDER BY updated_at DESC LIMIT %v`,
|
||||
sqlTableDefenderHosts, sqlPlaceholders[0], sqlPlaceholders[1])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user