]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-144001: Simplify Base64 decoding with altchars and ignorechars specified (GH-144324)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 2 Feb 2026 11:38:32 +0000 (13:38 +0200)
committerGitHub <noreply@github.com>
Mon, 2 Feb 2026 11:38:32 +0000 (13:38 +0200)
commitc3b61ef73da376620ca89b2db12e98bff1746d61
treeef2b632b40c029cfd8910be55259cb9458dd8fae
parent15c9f2491d235ca1bebfbfbdefdd8d6ac3869298
gh-144001: Simplify Base64 decoding with altchars and ignorechars specified (GH-144324)

Treat "+" and "/" like other characters not in the alternative Base64
alphabet when both altchars and ignorechars are specified.
E.g. discard them if they are not in altchars but are in ignorechars,
and set error if they are not in altchars and not in ignorechars.
Only emit warnings if ignorechars is not specified.
Doc/library/base64.rst
Lib/base64.py
Lib/test/test_base64.py