Bug 969309

Summary: anaconda crashes when typing non-latin character in user creation
Product: [Fedora] Fedora Reporter: Łukasz Posadowski <mail>
Component: anacondaAssignee: David Shea <dshea>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: alexey.shishin, anaconda-maint-list, andrey.henneberg, dshea, g.kaviyarasu, jonathan, l.mierzwa, mkolman, sbueno, stephent98, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-20.3-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 986470 (view as bug list) Environment:
Last Closed: 2014-01-30 22:06:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 986470    
Attachments:
Description Flags
anaconda-tb-G5F2mn none

Description Łukasz Posadowski 2013-05-31 07:45:59 UTC
Description of problem:
When I create user in anaconda I can enter my real name and username. My real name is Łukasz and username entry is filled automatically. And then anaconda crashes. I can type Lukasz as real name and everything is fine.

Version-Release number of selected component (if applicable):


How reproducible:
I tried it once.

Steps to Reproduce:
1. Create user in Anaconda (while installing packages)
2. type non-latin character in real name.

Actual results:
installer crashes

Expected results:
Be Łukasz.

Additional info:
I know that username generally shouldn't contain "Ł" character, but anaconda use it anyway. It crashes in the process, but even if it wouldn't, it's still bad idea to have "łukasz" username.

Comment 1 Łukasz Posadowski 2013-05-31 08:13:27 UTC
More additional info:

When I type "Łukasz Po" anaconda says:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc5 in position 0: unexpected end of data - anaconda.

Comment 2 David Shea 2013-07-19 21:06:10 UTC
Pushed a fix for the crash. As for translating the "Ł" in your name to "l" for the username, you're still going to have to do that manually. Anaconda uses the Unicode character definitions to remove diacritical marks. For example, "Á" is defined as equivalent to "A" plus an acute accent, so we remove the accent and use "a" in the username. For whatever reason, Unicode defines "Ł" as its own thing rather than being based on L, so we don't have a way to make that translation.

Comment 3 Steve Tyler 2013-07-20 04:00:27 UTC
Created attachment 776074 [details]
anaconda-tb-G5F2mn

I attempted to reproduce this, but my report was detected as a duplicate of:
Bug 981608 - UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 0: unexpected end of data

The user name was "lLłŁ" (from the attached log).

anaconda 19.30.13-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/users.py", line 162, in guess_username
    username = fullname[0][0].decode("utf-8").lower() + username
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/user.py", line 326, in _guessNames
    username = guess_username(fullname)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position 0: unexpected end of data

Local variables in innermost frame:
OMITTED BINARY DATAerrors: strict

...
user --groups=wheel --name=lLłŁ --password=$6$c6KaDlkY7lCDaY5g$ChjJ5yOMqwmlDhEEYbfysSwNmPofugCjrh9f7AMDqyntwLnJRMPGZ8A7jAXiYITO4jJCVJAb.SEktm/Bvt8FR1 --iscrypted --gecos="lLłŁ"
...

Comment 4 David Shea 2013-07-22 13:05:38 UTC
*** Bug 981608 has been marked as a duplicate of this bug. ***

Comment 5 Łukasz Mierzwa 2013-08-05 18:54:26 UTC
During netboot installation I've entered new user name containing UTF-8 characters

cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   initrd=initrd.img inst.stage2=hd:LABEL=Fedora\x2019\x20x86_64 quiet BOOT_IMAGE=vmlinuz 
hashmarkername: anaconda
kernel:         3.9.5-301.fc19.x86_64
package:        anaconda-19.30.13-1
product:        Fedora
reason:         UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position 0: unexpected end of data
release:        Cannot get release name.
version:        19

Comment 6 Alexey 2013-10-24 16:31:26 UTC
from install with love =/

cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   initrd=initrd.img inst.stage2=hd:LABEL=RFRemix\x2019\x20x86_64 quiet BOOT_IMAGE=vmlinuz 
hashmarkername: anaconda
kernel:         3.9.5-301.fc19.x86_64
package:        anaconda-19.30.13-1
product:        Fedora
reason:         UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 0: unexpected end of data
release:        Fedora release 19 (Schrödinger’s Cat)
version:        19