]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.6] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098...
authorWilliam Grzybowski <wg@FreeBSD.org>
Sun, 9 Sep 2018 11:26:48 +0000 (08:26 -0300)
committerVictor Stinner <vstinner@redhat.com>
Sun, 9 Sep 2018 11:26:48 +0000 (13:26 +0200)
commit1bcd891c200b8122493ddad5a203331e1a3bfcb5
treec70fac086a948bb93182b63c7209204ded73dddc
parent3b36642924a51e6bceb7033916c3049764817166
[3.6] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9105)

Pass the user/group name as Unicode to the formatting function,
instead of always decoding a bytes string from UTF-8..
(cherry picked from commit 28658485a54ad5f9df52ecc12d9046269f1654ec)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
Misc/NEWS.d/next/Library/2018-09-07-10-16-34.bpo-34604.xL7-kG.rst [new file with mode: 0644]
Modules/grpmodule.c
Modules/pwdmodule.c