Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaraade <feriemobiltelefon@gmail.com>2020-02-12 04:18:15 +0300
committerGitHub <noreply@github.com>2020-02-12 04:18:15 +0300
commitc0cee6bce659960d1c92b305296439ed6f0c6d44 (patch)
tree90a4fadf98e54cd217e2414e59fa650b18dda616
parent0c538aef3c86ba09e2e346e52c78a09d2422c00b (diff)
fail2ban: fix regex for NC18v1.20.10
-rw-r--r--bin/ncp/SECURITY/fail2ban.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ncp/SECURITY/fail2ban.sh b/bin/ncp/SECURITY/fail2ban.sh
index 5c8c6007..5aa65906 100644
--- a/bin/ncp/SECURITY/fail2ban.sh
+++ b/bin/ncp/SECURITY/fail2ban.sh
@@ -98,7 +98,9 @@ configure()
before = common.conf
[Definition]
-failregex = Login failed.*Remote IP.*<HOST>
+_groupsre = (?:(?:,?\s*"\w+":(?:"[^"]+"|\w+))*)
+failregex = ^\{%(_groupsre)s,?\s*"remoteAddr":"<HOST>"%(_groupsre)s,?\s*"message":"Login failed:
+datepattern = ,?\s*"time"\s*:\s*"%%Y-%%m-%%d[T ]%%H:%%M:%%S(%%z)?"
ignoreregex =
EOF