Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.14] gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)#146326

Merged
ambv merged 1 commit into
python:3.14python/cpython:3.14from
serhiy-storchaka:backport-4561f64-3.14serhiy-storchaka/cpython:backport-4561f64-3.14Copy head branch name to clipboard
Mar 23, 2026
Merged

[3.14] gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)#146326
ambv merged 1 commit into
python:3.14python/cpython:3.14from
serhiy-storchaka:backport-4561f64-3.14serhiy-storchaka/cpython:backport-4561f64-3.14Copy head branch name to clipboard

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Mar 23, 2026

Copy link
Copy Markdown
Member

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.
(cherry picked from commit 4561f64)

…rst padded quad (pythonGH-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.
(cherry picked from commit 4561f64)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.13 bugs and security fixes label Mar 23, 2026
@ambv ambv merged commit e31c551 into python:3.14 Mar 23, 2026
51 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 23, 2026
…rst padded quad (pythonGH-145267) (pythonGH-146326)

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.
(cherry picked from commit 4561f64)
(cherry picked from commit e31c551)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app

bedevere-app Bot commented Mar 23, 2026

Copy link
Copy Markdown

GH-146348 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Mar 23, 2026
ambv pushed a commit that referenced this pull request Mar 23, 2026
…dded quad (GH-145267) (GH-146326) (GH-146348)

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.
(cherry picked from commit 4561f64)
(cherry picked from commit e31c551)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.