From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Fri, 31 May 2024 07:00:33 +0000 (+0200) Subject: Fix hfilter checks_hello_badip X-Git-Tag: 3.9.0~30^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=61c8b623357a4615d54f1ffed5783681db5ca2dc;p=rspamd.git Fix hfilter checks_hello_badip --- diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index 8c132f504..6bc011b83 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -142,36 +142,36 @@ local checks_hello = [[ local checks_hello_map local checks_hello_badip = [[ -/^\d\.\d\.\d\.255$/i 1 -/^192\.0\.0\./i 1 +/^\d+\.\d+\.\d+\.255$/i 1 +/^192\.0\.0\.\d+/i 1 /^2001:db8::/i 1 -/^10\./i 1 -/^192\.0\.2\./i 1 -/^172\.1[6-9]\./i 1 -/^192\.168\./i 1 -/^::1$/i 1 # loopback ipv4, ipv6 +/^10\.\d+\.\d+\.\d+/i 1 +/^192\.0\.2\.\d+/i 1 +/^172\.1[6-9]\.\d+\.\d+/i 1 +/^192\.168\.\d+\.\d+/i 1 +/^127\.\d+\.\d+\.\d+/i 1 # loopback ipv4 +/^::1$/i 1 # loopback ipv6 /^ffxx::/i 1 /^fc00::/i 1 -/^203\.0\.113\./i 1 +/^203\.0\.113\.\d+/i 1 /^fe[cdf][0-9a-f]:/i 1 -/^100.12[0-7]\d\./i 1 +/^100.12[0-7]\.\d+\.\d+/i 1 /^fe[89ab][0-9a-f]::/i 1 -/^169\.254\./i 1 -/^0\./i 1 -/^198\.51\.100\./i 1 -/^172\.3[01]\./i 1 -/^100.[7-9]\d\./i 1 -/^100.1[01]\d\./i 1 -/^127\./i 1 -/^100.6[4-9]\./i 1 -/^192\.88\.99\./i 1 -/^172\.2[0-9]\./i 1 +/^169\.254\.\d+\.\d+/i 1 +/^0\.\d+\.\d+\.\d+/i 1 +/^198\.51\.100\.\d+/i 1 +/^172\.3[01]\.\d+\.\d+/i 1 +/^100.[7-9]\d\.\d+\.\d+/i 1 +/^100.1[01]\d\.\d+\.\d+/i 1 +/^100.6[4-9]\.\d+\.\d+/i 1 +/^192\.88\.99\.\d+/i 1 +/^172\.2[0-9]\.\d+\.\d+/i 1 ]] local checks_hello_badip_map local checks_hello_bareip = [[ -/^\d+[x.-]\d+[x.-]\d+[x.-]\d+$/ -/^[0-9a-f]+:/ +/^\d+[x.-]\d+[x.-]\d+[x.-]\d+$/i +/^[0-9a-f]+:/i ]] local checks_hello_bareip_map