Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode #118320

Merged
merged 6 commits into from May 7, 2024

Conversation

zhangyoufu
Copy link
Contributor

@zhangyoufu zhangyoufu commented Apr 26, 2024

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@serhiy-storchaka Except for consideration of my comment below, this looks good to me. I don't know whether you are someone else is best to review/merge.

Lib/test/test_binascii.py Outdated Show resolved Hide resolved
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@zhangyoufu
Copy link
Contributor Author

@terryjreedy Please add needs backport to 3.12 label and merge this PR. Thanks.

@encukou encukou added the needs backport to 3.12 bug and security fixes label May 7, 2024
@encukou encukou merged commit fe47d9b into python:main May 7, 2024
39 checks passed
@miss-islington-app
Copy link

Thanks @zhangyoufu for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 7, 2024
…mode (pythonGH-118320)

Fix an edge case in `binascii.a2b_base64` strict mode, where
excessive padding was not detected when no padding is necessary.

(cherry picked from commit fe47d9b)

Co-authored-by: Youfu Zhang <1315097+zhangyoufu@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented May 7, 2024

GH-118691 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label May 7, 2024
encukou pushed a commit that referenced this pull request May 7, 2024
… mode (GH-118320) (GH-118691)

gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320)

Fix an edge case in `binascii.a2b_base64` strict mode, where
excessive padding was not detected when no padding is necessary.

(cherry picked from commit fe47d9b)

Co-authored-by: Youfu Zhang <1315097+zhangyoufu@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@zhangyoufu zhangyoufu deleted the gh-118314 branch May 7, 2024 11:37
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
…mode (pythonGH-118320)

Fix an edge case in `binascii.a2b_base64` strict mode, where
excessive padding was not detected when no padding is necessary.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Pieter Eendebak <pieter.eendebak@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.

None yet

5 participants