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

Alan DeKok aland at deployingradius.com
Tue Aug 28 10:49:21 CEST 2007


Enrik Berkhan wrote:
> - I'd add a length parameter and check for str to utf8_char().

  Not needed.  The C string termination character '\0' is not a valid
UTF-8 character.

> - line 167(?) of src/lib/print.c should read
> 
>    ((utf8 = utf8_char((uint8_t *)str)) == 0)) {

  Yes.

> - for testing with HEAD I had to disbable the special case
> 
>    delimitst < 0
> 
>    in vp_prints_value(). May be this can be eliminated then.

  OK.

> And when testing, with a simple test setup like the following, remember
> that the escaped stuff may show up in the debug output only, as packet
> values will be translated back before being sent (is this correct? At
> least looks so ... )

  Yes.  The server will send exactly what you tell it to send, even if
it's garbage.

> Test setup, very simple again, thanks to unlang:

  <g>  I like that.

> (Don't know how the two strings will show up in the mail. Suppose they
> are valid UTF-8 and Latin1 ... :-)

  They both show up, but both as UTF-8.

> I think with a little fixing this can make it into HEAD and 1.1.x to be
> tested by others.

  Please try the following patch.  It's a little clearer.

  Alan DeKok.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20070828/c5d6fdd2/attachment.ksh>


More information about the Freeradius-Devel mailing list