Bug 969309 - anaconda crashes when typing non-latin character in user creation
anaconda crashes when typing non-latin character in user creation
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Shea
Fedora Extras Quality Assurance
:
: 981608 (view as bug list)
Depends On:
Blocks: 986470
  Show dependency treegraph
 
Reported: 2013-05-31 03:45 EDT by Łukasz Posadowski
Modified: 2014-01-30 17:06 EST (History)
11 users (show)

See Also:
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 17:06:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
anaconda-tb-G5F2mn (593.10 KB, text/plain)
2013-07-20 00:00 EDT, Steve Tyler
no flags Details

  None (edit)
Description Łukasz Posadowski 2013-05-31 03:45:59 EDT
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 04:13:27 EDT
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 17:06:10 EDT
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 00:00:27 EDT
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 09:05:38 EDT
*** Bug 981608 has been marked as a duplicate of this bug. ***
Comment 5 Łukasz Mierzwa 2013-08-05 14:54:26 EDT
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 12:31:26 EDT
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

Note You need to log in before you can comment on or make changes to this bug.