]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
don't expand structural types when used in "truthy" context
authorAlan T. DeKok <aland@freeradius.org>
Thu, 2 Jun 2022 13:23:17 +0000 (09:23 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 3 Jun 2022 11:16:00 +0000 (07:16 -0400)
commitb4cdc5a290dc9d5de25dc4ff40e7cfbf959bf3b9
tree8a23e41f129bdc52643fc84e4fa9579ded0ba531
parent6c9b6351beae30f8ef3d2e75859d83a163962b15
don't expand structural types when used in "truthy" context

&reply || ...

should NOT get a list of value-boxes out of the reply.  Instead,
it should just check for the "truthiness" of &reply.

We still need to add a special case for when a list is used by
itself, as in

if (&reply) { ...

but that can be handled with a few lines of code in the condition
evaluation code.
src/lib/unlang/xlat_expr.c
src/tests/unit/xlat/expr.txt