Mailing List Archive

[Bug 672] strict_acl_vars failures in the unused half of a conditional
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #2 from Brad "anomie" Jorsch <anomie@users.sourceforge.net> 2008-02-21 17:53:58 ---
Created an attachment (id=233)
--> (http://bugs.exim.org/attachment.cgi?id=233)
Patch to have find_variables never return null when skipping (with bug 474)

Consider this:
${if isset:acl_m_foo {$acl_m_foo}{foo is not available}}

If $acl_m_foo is not set, the condition will be false. Since the "true" half is
unused, there is no reason it should give an error there.

Turning off strict_acl_vars isn't an option, since the point of this is to have
some way to handle a possibly-unset variable when strict_acl_vars IS set.
Setting the variable requires finding and handling every path where the
variable could be unset and setting it explicitly; while possible, why bother
if you can just check for unsetness directly?

OTOH, you are correct that acl vars shouldn't be special. This new patch
eliminates all undefined variable errors in the unused half of a conditional.
Two versions are needed, depending on whether the patch from bug #474 has been
applied or not.


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

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 672] strict_acl_vars failures in the unused half of a conditional [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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

Tony Finch <fanf@exim.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |fanf@exim.org




--- Comment #1 from Tony Finch <fanf@exim.org> 2008-02-21 14:49:07 ---
I'm not sure this patch makes sense. Why should ACL variables be treated UNLIKE
other variables when you have turned on the option which tells Exim to treat
them LIKE other variables? Why not just turn off strict_acl_vars? Or set your
ACL variable to "" or some other sentinel value instead of leaving it unset?


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

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 672] strict_acl_vars failures in the unused half of a conditional [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #3 from Brad "anomie" Jorsch <anomie@users.sourceforge.net> 2008-02-21 17:54:03 ---
Created an attachment (id=234)
--> (http://bugs.exim.org/attachment.cgi?id=234)
Patch to have find_variables never return null when skipping (without bug 474)


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

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##