Problem with expansion of %{Ldap-UserDn} containing UTF-8 (cf. Bug #411)

Enrik Berkhan enrik#freeradius at planb.de
Fri Aug 24 19:51:36 CEST 2007


Alan DeKok schrieb:
> Enrik Berkhan wrote:
>>>   I think the solution is to update src/lib/print.c to handle UTF-8 by
>>> default.
>> Ok, so how should this be gone about? Change librad_safeprint() to allow
>> 8bit or UTF-8 only?
> 
>   Change it to allow UTF-8.  Most modern systems support this.

So, this could be done using iconv(), for example. Would this be ok?

Hmm, I've just looked at HEAD: there, vp_prints_value() has a special
case (delimitst < 0) used by valuepair2str in xlat.c explicitly to make
vp_prints_value() 8bit clean ... now I'm a bit confused ...

> RCS file: /source/radiusd/src/lib/print.c,v
> Working file: print.c
> head: 1.49
> branch:
> locks: strict
> access list:
> symbolic names:
>         [...]
> keyword substitution: kv
> total revisions: 54;    selected revisions: 1
> description:
> ----------------------------
> revision 1.27
> date: 2004/08/18 20:58:11;  author: aland;  state: Exp;  lines: +24 -27
>         If we're printing to a string for xlat's, don't bother escaping
>         characters, as the user-specified escape function will do that
>         for us
> =============================================================================

May be just put this on the 1.1.x branch instead?

Enrik



More information about the Freeradius-Devel mailing list