]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-135241: Make unpickling of booleans in protocol 0 more strict (GH-135242)
authorJustin Applegate <70449145+Legoclones@users.noreply.github.com>
Thu, 14 Aug 2025 19:22:37 +0000 (13:22 -0600)
committerGitHub <noreply@github.com>
Thu, 14 Aug 2025 19:22:37 +0000 (22:22 +0300)
commit781294019db1247e6197d658cfcbc35c8c0ae25f
tree19f969bec76084ec0ad1fd0b7a60755d8e0d1697
parent0cbbfc462119b9107b373c24d2bda5a1271bed36
gh-135241: Make unpickling of booleans in protocol 0 more strict (GH-135242)

The Python pickle module looks for "00" and "01" but _pickle only looked
for 2 characters that parsed to 0 or 1, meaning some payloads like "+0" or
" 0" would lead to different results in different implementations.
Lib/test/pickletester.py
Misc/NEWS.d/next/Library/2025-06-08-01-10-34.gh-issue-135241.5j18IW.rst [new file with mode: 0644]
Modules/_pickle.c