bin/142932: adduser script add bogus symbol at "full name" field when russian letter is deleted by backspace key

Serg mail_of_sergey at mail.ru
Mon Jan 18 11:40:07 UTC 2010


>Number:         142932
>Category:       bin
>Synopsis:       adduser script add bogus symbol at "full name" field when russian letter is deleted by backspace key
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 18 11:40:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Serg
>Release:        FreeBSD 8.0-RELEASE-p2
>Organization:
>Environment:
FreeBSD acc.acc.tula.ru 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #5: Fri Jan 15 17:04:04 MSK 2010     root at acc.acc.tula.ru:/usr/src/sys/i386/compile/Z  i386
echo $LANG
ru_RU.UTF-8
putty 0.60: the backspace key: Control-? (127), charset - UTF-8.
>Description:
I connect to remote FreeBSD machine via via Putty.
I add new user by adduser script.
I type russian letters at "full name" field and delete one russian letter by backspace key and type new russian letters.
At this case the adduser script shows the "full name" field with bogus symbol:
Password   : <blank>
Full Name  : &#1051;<D0>&#1080;&#1085;
Uid        : 1180

The bogus symbol is in brockets. I see bogus symbol D0 and D1.
This bogus symbol will be written to GEOS field of password file. :(


According to UTF-8 encoding table and Unicode characters (http://www.utf8-chartable.de/unicode-utf8-table.pl) (don't forget select cyrylic page) any russian letter is presented by two bytes. The first byte is D0 (or D1 for some letters)

It is looks like the backspace key deleted only one byte of two-byte encoding.
>How-To-Repeat:
1. run adduser
2. Start to type full name by russian letters (or other two-byte presented letters)
3. Delete one letter by backspace key
4. Continue type letters
5. Conrinue add user.
6. tail /etc/passwd
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list