This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author baikie
Recipients baikie, dedded, ggenellina, loewis, vstinner
Date 2009-01-02.21:38:52
SpamBayes Score 9.14672e-06
Marked as misclassified No
Message-id <>
@ Victor Stinner: Yes, the behaviour of those functions is as you
describe - it's been changed since I filed this issue.  I do
consider it an improvement.

By the password database, I mean /etc/passwd or replacements that
are accessible via getpwnam() and friends.  Users are often
allowed to change things like the GECOS field, and can generally
stick any old junk in there, regardless of encoding.  Now that I
come to check, it seems that in the Python 3.0 release, the pwd.*
functions do raise UnicodeDecodeError when the GECOS field can't
be decoded (bizarrely, they try to interpret it as a Python
string literal, and thus choke on invalid backslash escapes).
Unfortunately, this allows a user to change their GECOS field so
that system programs written in Python can't determine the
username corresponding to that user's UID or vice versa.
Date User Action Args
2009-01-02 21:38:54baikiesetrecipients: + baikie, loewis, ggenellina, vstinner, dedded
2009-01-02 21:38:53baikiesetmessageid: <>
2009-01-02 21:38:53baikielinkissue3023 messages
2009-01-02 21:38:52baikiecreate