Bug 235533 - system-config-users throws an exception if passwd file contains invalid utf-8
system-config-users throws an exception if passwd file contains invalid utf-8
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: system-config-users (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nils Philippsen
bzcl34nup
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-06 15:26 EDT by Ray Strode [halfline]
Modified: 2008-05-08 05:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-08 05:38:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ray Strode [halfline] 2007-04-06 15:26:00 EDT
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/system-config-users.py", line 46, in <module>
    mainWindow.mainWindow()
  File "/usr/share/system-config-users/mainWindow.py", line 269, in __init__
    self.refresh()
  File "/usr/share/system-config-users/mainWindow.py", line 430, in refresh
    self.populate_lists()
  File "/usr/share/system-config-users/mainWindow.py", line 521, in populate_lists
    self.populate_user_list()
  File "/usr/share/system-config-users/mainWindow.py", line 461, in
populate_user_list
    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 19:59:30 EDT
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:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 2 Bug Zapper 2008-05-06 21:26:46 EDT
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:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp
Comment 3 Nils Philippsen 2008-05-08 05:17:15 EDT
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.