summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-03-11 15:54:26 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2022-03-11 16:05:52 +0000
commit564960ff88ddf58b15acad60e3d5d06d84293c6a (patch)
tree9405c61718a6da2d8adc5c4613f107cc634dde78 /doc
parent1ed70f64c0df2c1428057c2ad5b3d43260087396 (diff)
Set $value for match_<list-type> and inlist
Diffstat (limited to 'doc')
-rw-r--r--doc/doc-docbook/spec.xfpt25
-rw-r--r--doc/doc-txt/NewStuff4
2 files changed, 29 insertions, 0 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 1f0f473d8..105e2fc5d 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -11902,6 +11902,19 @@ ${if inlisti{Needle}{fOo:NeeDLE:bAr}}
${if forany{fOo:NeeDLE:bAr}{eqi{$item}{Needle}}}
.endd
+.new
+The variable &$value$& will be set for a successful match and can be
+used in the success clause of an &%if%& expansion item using the condition.
+.cindex "tainted data" "de-tainting"
+It will have the same taint status as the list; expansions such as
+.code
+${if inlist {$h_mycode:} {0 : 1 : 42} {$value}}
+.endd
+can be used for de-tainting.
+Any previous &$value$& is restored after the if.
+.wen
+
+
.vitem &*isip&~{*&<&'string'&>&*}*& &&&
&*isip4&~{*&<&'string'&>&*}*& &&&
&*isip6&~{*&<&'string'&>&*}*&
@@ -12098,6 +12111,18 @@ item can be used, as in all address lists, to cause subsequent items to
have their local parts matched casefully. Domains are always matched
caselessly.
+.new
+The variable &$value$& will be set for a successful match and can be
+used in the success clause of an &%if%& expansion item using the condition.
+.cindex "tainted data" "de-tainting"
+It will have the same taint status as the list; expansions such as
+.code
+${if match_local_part {$local_part} {alice : bill : charlotte : dave} {$value}}
+.endd
+can be used for de-tainting.
+Any previous &$value$& is restored after the if.
+.wen
+
Note that <&'string2'&> is not itself subject to string expansion, unless
Exim was built with the EXPAND_LISTMATCH_RHS option.
diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff
index 730508adc..11004e33a 100644
--- a/doc/doc-txt/NewStuff
+++ b/doc/doc-txt/NewStuff
@@ -23,6 +23,10 @@ Version 4.96
built using untrusted data ("tainted"). For now lack of quoting is merely
logged; a future release will upgrade this to an error.
+ 7. The expansion conditions match_<list-type> and inlist now set $value for
+ the expansion of the "true" result of the ${if}. With a static list, this
+ can be used for de-tainting.
+
Version 4.95
------------