xlat expansion of absent VPs

Stelian Ionescu sionescu at cddr.org
Mon Jun 17 17:27:35 CEST 2013

On Mon, 2013-06-17 at 10:53 -0400, Alan DeKok wrote:
> Stelian Ionescu wrote:
> > In processing a request that does not contain Called-Station-Id, I
> > noticed that absent VPs now get expanded to an underscore instead of the
> > usual empty string:
>   That's how it was in 2.x.  Or at least how the code was *supposed* to
> work.

That's definitely not how it worked in 2.x, and as for what was supposed
to happen, it's too late to argue about it now.

>   The idea is that a place-holder is better than silently expanding to
> an empty string.  An empty string means that data which is supposed to
> be 4 columns (for example) is now suddenly 3.  That's bad.

That's not true, at least not in a SQL statement.
SELECT %{FOO}, %{BAR}, %{BAZ} that may expand to «SELECT a, , c» will
raise a syntax error. I can't think of a case where the deletion of a
token will result in a valid SQL expression.

Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20130617/0c129657/attachment.pgp>

More information about the Freeradius-Devel mailing list