Freeradius not unescaping \ and "
Murray Long
murray at skyrove.com
Tue Sep 7 11:08:45 CEST 2010
What seems to be happening here:
When passing variables to the perl module,
"void fr_print_string(const char *in, size_t inlen, char *out, size_t outlen)"
Escapes all special characters (including '\')
When variables are returned from perl,
VALUE_PAIR *pairparsevalue(VALUE_PAIR *vp, const char *value)
unescapes special characters, but ignores "\\"
I've patched the pairparsevalue function to handle an escaped
backslash, which has solved my problems. However this is my first
time looking at freeradius source, so have no idea what knock-on
effects this will have, so please could someone review this for me.
Many Thanks,
Murray
On Fri, Sep 3, 2010 at 5:58 PM, Murray Long <murray at skyrove.com> wrote:
> Ok, debug logs and config files are attached.
>
> It looks like the problem could be with rlm_perl. as the proxying
> happens correctly if we disable the perl module completely.
> However, even with no logic happening in the perl script, additional
> \'s are added to the attributes.
>
> Please see the attached log of a login attempt for
> Username: "murray/A\"
> Password: "A\"
>
> which is eventually proxied as
> User-Name = "A\\\\\\\\"
> User-Password = "A\\\\\\\\"
>
> Thanks,
> Murray
>
> On Fri, Sep 3, 2010 at 3:33 PM, Alan DeKok <aland at deployingradius.com> wrote:
>>
>> Murray Long wrote:
>> > I am running the latest version provided by Ubuntu, 2.1.8+dfsg-1ubuntu1
>> > Is this not considered recent?
>> > I will try 2.1.9 from the freeradius site and see how that goes.
>>
>> Well.. it works in the current 2.1.x branch.
>>
>> How about posting debug logs?
>>
>> Alan DeKok.
>> -
>> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pairparsevalue.patch
Type: text/x-patch
Size: 535 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100907/1c349ac4/attachment.bin>
More information about the Freeradius-Users
mailing list