Fix ${ipv6norm:}
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 4 May 2021 12:06:31 +0000 (13:06 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 4 May 2021 12:06:31 +0000 (13:06 +0100)
doc/doc-txt/ChangeLog
src/src/host.c
test/scripts/0000-Basic/0002
test/stdout/0002

index 68cec8531299d23b96a82a2877a204c80a666172..c3fc01389fb297a6848df07fdf3aa962d9d150fc 100644 (file)
@@ -245,6 +245,10 @@ JH/51 Taint-check ACL line.  Previously, only filenames (for out-of-line ACL
       content) were specifically tested for.  Now, also cover epxansions
       rerulting in acl names and inline ACL content.
 
+JH/52 Fix ${ip6norm:} operator.  Previously, any trailing line text was dropped,
+      making it unusable in complex expressions.
+    
+
 
 
 Exim version 4.94
index 18f1b54f85faaa2c6f6935acfa16f4fda11bf95b..5e66517e8e9c45d12db39699dddab9f4c7308636 100644 (file)
@@ -1201,9 +1201,9 @@ for (c = buffer, k = -1, i = 0; i < 8; i++)
   c++;
   }
 
-c[-1] = '\0';  /* drop trailing colon */
+*--c = '\0';   /* drop trailing colon */
 
-/* debug_printf("%s: D k %d <%s> <%s>\n", __FUNCTION__, k, d, d + 2*(k+1)); */
+/* debug_printf("%s: D k %d <%s> <%s>\n", __FUNCTION__, k, buffer, buffer + 2*(k+1)); */
 if (k >= 0)
   {                    /* collapse */
   c = d + 2*(k+1);
index 5101be453050e15ba9ee991303402b6f07ab1ff3..d3b4984fe13c2c9ffcd2b95c9f66eec198c8886d 100644 (file)
@@ -258,7 +258,7 @@ ipv6norm:   ${ipv6norm:2a00::1}
 ipv6norm:   ${ipv6norm:2a00:eadf:0000:0000:0000:0000:0001:0000}
 ipv6norm:   ${ipv6norm:2a00:eadf:0000:0001:0000:0000:0000:0000}
 ipv6norm:   ${ipv6norm:2a00:0:0:0::}
-ipv6norm:   ${ipv6norm:2a00:2:3:4:5:6:7:8}
+ipv6norm:   ${ipv6norm:2a00:2:3:4:5:6:7:8}trailing_text
 nhash:  ${nhash_24:monty} ${nhash_8_63:monty python}
 lc/uc:  ${lc:The Quick} ${uc: Brown Fox}
 length: ${length_10:The quick brown fox} ${l_10:abc}
index b55571cc6c08a41f64af2cc9e7e42a150bf74fe6..845b6b4af7c03d57d6209cb3a09699c2167d096d 100644 (file)
@@ -240,7 +240,7 @@ newline     tab\134backslash ~tilde\177DEL\200\201.
 > ipv6norm:   2a00:eadf::1:0
 > ipv6norm:   2a00:eadf:0:1::
 > ipv6norm:   2a00::
-> ipv6norm:   2a00:2:3:4:5:6:7:8
+> ipv6norm:   2a00:2:3:4:5:6:7:8trailing_text
 > nhash:  19 0/61
 > lc/uc:  the quick  BROWN FOX
 > length: The quick  abc