From: Heiko Schlittermann (HS12-RIPE) Date: Sat, 7 Oct 2023 11:07:59 +0000 (+0200) Subject: Testsuite: Add testcases for string_is_ip_address (CVE-2023-42117) X-Git-Tag: exim-4.96.2~3^2~1 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/cad7a632f9d1537f49952e788bb01c6863650be9 Testsuite: Add testcases for string_is_ip_address (CVE-2023-42117) --- diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index d169518b6..df4f91b4b 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -442,6 +442,7 @@ ge: ${if ge{ABC}{abc}{y}{n}} gei: ${if gei{ABC}{abc}{y}{n}} isip: ${if isip {1.2.3.4}{y}{n}} 1.2.3.4 +isip: ${if isip {1.2.3}{y}{n}} 1.2.3 isip4: ${if isip4{1.2.3.4}{y}{n}} 1.2.3.4 isip6: ${if isip6{1.2.3.4}{y}{n}} 1.2.3.4 isip: ${if isip {::1.2.3.256}{y}{n}} ::1.2.3.256 @@ -459,6 +460,9 @@ isip: ${if isip {fe80::1.2.3.4}{y}{n}} fe80::1.2.3.4 isip: ${if isip {rhubarb}{y}{n}} rhubarb isip4: ${if isip4{rhubarb}{y}{n}} rhubarb isip6: ${if isip6{rhubarb}{y}{n}} rhubarb +isip6: ${if isip6{::/100}{y}{n}} ::/100 +isip6: ${if isip6{::/foo}{y}{n}} ::/foo +isip6: ${if isip6{::/f o}{y}{n}} ::/f o match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail} match: ${if match{abcd}{^\N([ab]+)(\w+)$\N}{$2$1}fail} diff --git a/test/stdout/0002 b/test/stdout/0002 index 74219a6f3..a0677dc5a 100644 --- a/test/stdout/0002 +++ b/test/stdout/0002 @@ -418,6 +418,7 @@ newline tab\134backslash ~tilde\177DEL\200\201. > gei: y > > isip: y 1.2.3.4 +> isip: n 1.2.3 > isip4: y 1.2.3.4 > isip6: n 1.2.3.4 > isip: n ::1.2.3.256 @@ -435,6 +436,9 @@ newline tab\134backslash ~tilde\177DEL\200\201. > isip: n rhubarb > isip4: n rhubarb > isip6: n rhubarb +> isip6: n ::/100 +> isip6: n ::/foo +> isip6: n ::/f o > > match: cdab > match: cdab