]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 22 Mar 2026 21:12:58 +0000 (23:12 +0200)
committerGitHub <noreply@github.com>
Sun, 22 Mar 2026 21:12:58 +0000 (23:12 +0200)
commit4561f6418a691b3e89aef0901f53fe0dfb7f7c0e
tree26d0dce5385c0ccc5e89635866909e151ac51378
parentae6adc907907562e4ffbb5355f12e77e9085c506
gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)

Base64 decoder (see binascii.a2b_base64(), base64.b64decode(), etc)
no longer ignores excess data after the first padded quad in non-strict
(default) mode.  Instead, in conformance with RFC 4648, it ignores the
pad character, "=", if it is present before the end of the encoded data.
Lib/test/test_binascii.py
Misc/NEWS.d/next/Library/2026-02-26-20-13-16.gh-issue-145264.4pggX_.rst [new file with mode: 0644]
Modules/binascii.c