Am Montag, 23. Januar 2012, 23:28:33 schrieben Sie:
> Package: gosa
> Version: 2.6.11-3
> Severity: important
> User: [email protected]
> Usertags: debian-edu
> 
> I discovered this problem in Debian Edu/Squeeze.  When a user with a
> non-ASCII character in the third position of the first or last name is
> created, the generated username contain a non-valid UTF-8 character.
> 
> In Debian Edu, our gosa.conf contain the following rule:
> idGenerator="{%givenName[3-6]}{%sn[3-6]}".
> 
> When using UTF-8, the range [3-6] at the moment do not refer to
> characters, but bytes in the UTF-8 string.  This caused the user 'Gunnar
> Grændal' to get a propsed username with gungr?, where ? was half the
> UTF-8 bytestream for æ.  I believe it would be better if [3-6] refered
> to characters 3-6, not bytes 3-6.
> 
> As non-ASCII usernames can cause problem when trying to log in to
> different systems, I believe it would be best if usernames are always
> converted to ASCII, preferably using the //TRANSLIT rule in glibc.
> 
> For the example above, one would then end up with "echo gungræ | iconv
> -t ASCII//TRANSLIT" = gungrae as the proposed username.

While it is discussable why this bug is "important", 2.7.x packages do the 
conversation in another way:

             $value = iconv('UTF-8', 'US-ASCII//TRANSLIT', $value);

Same for the 2.6.x maintainance series. You can simply take the function 
gen_uids from here

https://oss.gonicus.de/labs/gosa/browser/tags/2.6.13/gosa-
core/include/functions.inc

in order to create a patch for squeeze.

HTH,
Cajus

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to