Skip to content

gh-155426: correctly reject non-bytes keys in hmac.digest - #155427

Open
picnixz wants to merge 2 commits into
python:mainfrom
picnixz:meta/crypto/py/hmac/key-ljust-invalid-155426
Open

gh-155426: correctly reject non-bytes keys in hmac.digest#155427
picnixz wants to merge 2 commits into
python:mainfrom
picnixz:meta/crypto/py/hmac/key-ljust-invalid-155426

Conversation

@picnixz

@picnixz picnixz commented Aug 9, 2026

Copy link
Copy Markdown
Member

This only affects keys of length smaller than the HMAC blocksize
since larger keys are hashed first.
@picnixz
picnixz force-pushed the meta/crypto/py/hmac/key-ljust-invalid-155426 branch from fe28b30 to 0c1bf69 Compare August 9, 2026 12:42
@picnixz picnixz changed the title gh-155426: correctly accept bytes-like keys in hmac.digest gh-155426: correctly reject non-bytes keys in hmac.digest Aug 9, 2026
@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 9, 2026
Comment thread Misc/NEWS.d/next/Library/2026-08-09-14-06-27.gh-issue-155426.zZVPMd.rst Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant