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 <1230932333.8.0.834610747321.issue3023@psf.upfronthosting.co.za>
In-reply-to
Content
@ 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.
History
Date User Action Args
2009-01-02 21:38:54baikiesetrecipients: + baikie, loewis, ggenellina, vstinner, dedded
2009-01-02 21:38:53baikiesetmessageid: <1230932333.8.0.834610747321.issue3023@psf.upfronthosting.co.za>
2009-01-02 21:38:53baikielinkissue3023 messages
2009-01-02 21:38:52baikiecreate