]> source.dussan.org Git - rspamd.git/commitdiff
Fix hfilter checks_hello_badip 4997/head
authorDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Fri, 31 May 2024 07:00:33 +0000 (09:00 +0200)
committerGitHub <noreply@github.com>
Fri, 31 May 2024 07:00:33 +0000 (09:00 +0200)
src/plugins/lua/hfilter.lua

index 8c132f504583008e49ce976c9ef7cff709cdc114..6bc011b839d702a01cf9b32947bb00fcabd569f1 100644 (file)
@@ -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