regex matching can be convinced to be TRUE if you're insistive enough?

Stefan Winter stefan.winter at restena.lu
Thu May 26 09:58:16 CEST 2011


HI again,

the bug isn't triggered exclusively by string length. It also must have
to do with number of attributes being globbed together via [*]. To
illustrate:

                Bla  =
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*100*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*200*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*300*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*400*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*500*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*600*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*700*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*800*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*900*",
                Bla +=
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123*1000*",
                Bla +=
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123*1100*",
                Bla += "A"

This triggered a false  match of the regex.

                Bla  =
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*100*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*200*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*300*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*400*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*500*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*600*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*700*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*800*",
                Bla +=
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234*900*",
                Bla +=
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123*1000*",
                Bla +=
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123*1100*A"

While this didn't. Nor did "AB" in the end of the string, after all the
newline is also a character after globbing. Strange.

Stefan


Am 26.05.2011 09:29, schrieb Stefan Winter:
> Hi,
>
>>   Yes.  I think it should be fixed in v2.1.x.
> Doesn't seem to work; I get the exact same behviour:
>
> +- entering group authorize {...}
> ++[control] returns notfound
> ++? if ("%{control:Bla[*]}" =~ /zzzz/ )
>         expand: %{control:Bla[*]} -> *1*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *2*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *3*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *4*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *5*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *6*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *7*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *8*
> lkkgflaksdjfhklsajfdghaösfdlghaskljfdghalksdfjghaklsdfjghkdalsfjghaklsfdghaklsdfjghlaksdfghaklsdfjghsdaklfjghkladsfjgh
> *
> ? Evaluating ("%{control:Bla[*]}" =~ /zzzz/) -> TRUE
>
> I'm trying to find the tipping point right now; it is *not* at the debug
> output length delimiter, but somewhere later.
>
> Stefan
>
>>   Alan DeKok.
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html


-- 
Stefan WINTER
Ingenieur de Recherche
Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg

Tel: +352 424409 1
Fax: +352 422473


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20110526/6c2bc984/attachment.pgp>


More information about the Freeradius-Devel mailing list