Re: confusion about lists always expanding.

Jeremy Harris via Exim-users <[email protected]> Tue, 14 Jul 2026 07:57:28 +0100
Newsgroups gmane.mail.exim.user
Message-ID <[email protected]>
On 2026/07/14 6:44 AM, Jasen Betts via Exim-users wrote:
> On 2026-05-27, Jeremy Harris via Exim-users <[email protected]> wrote:
>> On 2026/05/12 11:37 PM, Jasen Betts via Exim-users wrote:
>>> I have something like
>>>    
>>> (0)     ${if inlist{$local_part@$domain}{<,$acl_m_specialrcpts}}
>>>
>>> It mostly works, but if $acl_m_specialrcpts which is tainted
>>> contains a '$' I get a panic about expanding taited data,
At first sight, the inlist should work.  I'll investigate.
I can duplicate the issue under expansion-test (-be).

For now, use the forany construct (less efficient as well as
more complex to write...)

Not sure why you have the extra leading character in your
acl_m_specialrcpts; it's certainly adding complexity here.


> Also should there be a warning about expanding tainted data when it
> does not contain a '$'?

Probably a pre-scan of the string-for-expansion found no $, so the expansion
was bypassed - and the check for taint is at the head of the routine
doing the latter.  Maybe it should indeed have whined... I suspect there
are such pre-checks in multiple places which could do with consolidation.

However, this is a consistency issue rather than a security one
so low priority.
-- 
Cheers,
   Jeremy

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at https://www.exim.org/
## Please use the Wiki with this list - https://code.exim.org/exim/wiki/wiki