[exim-dev] [Bug 1518] router condition silently ignored if t…

Top Pagina
Delete this message
Reply to this message
Auteur: Todd Lyons
Datum:  
Aan: exim-dev
Onderwerp: [exim-dev] [Bug 1518] router condition silently ignored if too many back braces
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1518




--- Comment #5 from Todd Lyons <tlyons@???> 2014-08-26 15:46:24 ---
*OH*, I misread the debug output the first time. I thought it was moving on to
the next router instead of accepting this one.

What happens is that it's expanding to more than you think. In order to allow
any arbitrary string to be set, the number of trailing closing brackets can be
more than the number of opening ones.

And that also explains why it's being accepted:

[todd@tlyons ~]$ exim -be '${if eq {${lc:GOOGLE.com}} {google.com}} {yes}
{no}}'
true {yes} {no}}
[todd@tlyons ~]$ exim -be '${if eq {${lc:WHOIS.com}} {google.com}} {yes} {no}}'
{yes} {no}}

In each case, the condition appears to be a string, which expands to a yes,
AFAIU. This is unverified from the code, but I'll try and dig in to it.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email