Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 235533 - system-config-users throws an exception if passwd file contains invalid utf-8
Summary: system-config-users throws an exception if passwd file contains invalid utf-8
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-users
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact:
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-06 19:26 UTC by Ray Strode [halfline]
Modified: 2008-05-08 09:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-05-08 09:38:43 UTC

Attachments (Terms of Use)

Description Ray Strode [halfline] 2007-04-06 19:26:00 UTC
So, yesterday I fixed bug 235351 in GDM where it would crash if /etc/passwd
contained non-utf8 characters.

Today I went to system-config-users to delete the test user I created yesterday
and a few other test users I had on my laptop and it crashed, too. :-)

The output is:
Traceback (most recent call last):
  File "/usr/share/system-config-users/", line 46, in <module>
  File "/usr/share/system-config-users/", line 269, in __init__
  File "/usr/share/system-config-users/", line 430, in refresh
  File "/usr/share/system-config-users/", line 521, in populate_lists
  File "/usr/share/system-config-users/", line 461, in
    gecos = unicode (gecos, 'utf-8')
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 2-3: unexpected
end of data

The easiest fix is probably to add a third argument 'replace' to make it add
unicode "i don't know what this" characters instead of throwing an exception.

Or if you were feeling extra motivated you could try converting from some of the
most popular encodings out there and converting to utf8, but that doesn't seem
worth the effort.

Comment 1 Bug Zapper 2008-04-03 23:59:30 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here: to ensure this
doesn't happen again.

Comment 2 Bug Zapper 2008-05-07 01:26:46 UTC
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:

Comment 3 Nils Philippsen 2008-05-08 09:17:15 UTC
1.2.80 with the fix you outlined above is building for F10 right now.

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