]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43086: Add handling for out-of-spec data in a2b_base64 (GH-24402)
authorIdan Moral <idan22moral@gmail.com>
Mon, 19 Jul 2021 00:45:19 +0000 (03:45 +0300)
committerGitHub <noreply@github.com>
Mon, 19 Jul 2021 00:45:19 +0000 (17:45 -0700)
commit35b98e38b6edd63153fc8e092f94cb20725dacc1
tree0075d1bd3b9f195c5bd60553f9adcb5ef72a6fa1
parentb494685b2548489efcc66993cc6c13b027ce3b26
bpo-43086: Add handling for out-of-spec data in a2b_base64 (GH-24402)

binascii.a2b_base64 gains a strict_mode= parameter. When enabled it will raise an
error on input that deviates from the base64 spec in any way.  The default remains
False for backward compatibility.

Code reviews and minor tweaks by: Gregory P. Smith <greg@krypto.org> [Google]
Doc/library/binascii.rst
Lib/test/test_binascii.py
Misc/NEWS.d/next/Library/2021-01-31-18-24-54.bpo-43086.2_P-SH.rst [new file with mode: 0644]
Modules/binascii.c
Modules/clinic/binascii.c.h