3.0.x: user-password length decoding sometimes wrong?

Stefano Mason stefano.mason at eng-mo.it
Mon Nov 30 18:29:03 CET 2015


On 11/30/2015 06:06 PM, Alan DeKok wrote:
> On Nov 30, 2015, at 12:01 PM, Stefano Mason <stefano.mason at eng-mo.it> wrote:
>> Your code in action from Brocade switch (password MATgia00):
>> ...
>> Mon Nov 30 17:47:37 2015 : Debug: (1)         Overwriting value "0x4d415467696130300000000000000019" with "0x4d41546769613030000000000000
>    The regular expression is matching on the last binary "00" instead of the first.
>
>    This has nothing to do with the ASCII "00" in User-Password.


Thanks Alan, you are right. When I saw this behaviour from regex I tried 
to change the number of zero that match on

(Tmp-Octets-0 =~ /^(0x(..)+)000000/)

and in this way I remove the final part of password because 3030 become 303.

Best regards.
Stefano





More information about the Freeradius-Users mailing list