parent
834f173bb9
commit
595828c5f6
|
|
@ -136,7 +136,7 @@ class Fail2BanJailModal extends ModalComponent
|
||||||
WITH last AS (
|
WITH last AS (
|
||||||
SELECT ip, MAX(timeofban) AS t
|
SELECT ip, MAX(timeofban) AS t
|
||||||
FROM bans
|
FROM bans
|
||||||
WHERE jail=%s
|
WHERE jail=:JAIL:
|
||||||
GROUP BY ip
|
GROUP BY ip
|
||||||
),
|
),
|
||||||
curr AS (
|
curr AS (
|
||||||
|
|
@ -353,7 +353,7 @@ SQL;
|
||||||
$ipList = $this->firstMatch('/Banned IP list:\s*(.+)$/mi', $out3) ?: '';
|
$ipList = $this->firstMatch('/Banned IP list:\s*(.+)$/mi', $out3) ?: '';
|
||||||
return $ipList !== '' && preg_match('/(^|\s)'.preg_quote($ip,'/').'(\s|$)/', $ipList) === 1;
|
return $ipList !== '' && preg_match('/(^|\s)'.preg_quote($ip,'/').'(\s|$)/', $ipList) === 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getBantime(string $jail): int
|
private function getBantime(string $jail): int
|
||||||
{
|
{
|
||||||
[, $out] = $this->f2b('get '.escapeshellarg($jail).' bantime');
|
[, $out] = $this->f2b('get '.escapeshellarg($jail).' bantime');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue