Issues with rlm_perl in 3.0.2

Arran Cudbard-Bell a.cudbardb at freeradius.org
Sun Apr 6 23:24:03 CEST 2014


On 6 Apr 2014, at 22:22, Sorin Pop <sorin.pop at certcore.com> wrote:

> Hi
>    I wanted to ask if anyone came across this problem. I got freeradius 3.0.2 and enabled the perl module. and after fiddling with it I found some issues
> 
> the change that I made was to example.pl by doing this
> 
> ---
> # Function to handle authenticate
> sub authenticate {
>     my $memcache_key = $RAD_REQUEST{'User-Name'};
> 
>     open( my $fh, '>', '/tmp/x2' );
>     print $fh $memcache_key;
>     close( $fh );
>     return RLM_MODULE_OK;
> }
> ---
> 
> and I was expecting to get the username in /tmp/x2 file but instead I got this
> 
> ---
> [root at radius perl]# cat /tmp/x2
> this_is_my_user_but_what_is_this pc|wo
> ▒"
>    ▒▒;▒▒;▒▒;▒▒;▒{▒
>                   ;b ▒4b|wn''▒▒;        0▒}▒ٞd▒▒;0▒}
> ▒▒;▒▒;P▒}▒.▒dUNIVERSAL::Ğd(▒▒▒@c@ pc|,,▒.▒d
>  ▒▒0▒}▒ٞd▒1[|wn(▒▒▒▒▒▒P
>                        ▒.▒d0▒}p
> z▒▒2b`{▒{▒Qba▒▒▒▒b▒2b0▒}P▒▒▒▒b
> ▒"@▒▒
>       ▒▒▒P▒}
>             0▒}▒2b▒2b▒{▒▒2b;b0
> Z<b0▒}0▒}
> ---
> 
> the user that I tested with is: "this_is_my_user_but_what_is_this". I tested it with different lengths of usernames and it seems to be a leak somewhere as the returns jumps around
> 
> so unless I am doing something completely wrong, this might be an issue with the way the variables are passed on.
> 
> The odd thing is that if I use the internal debugger the strings seem to be correct.

https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/doc/ChangeLog#L47

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/mailman/private/freeradius-devel/attachments/20140406/4d2d38a8/attachment.pgp>


More information about the Freeradius-Devel mailing list