Repository navigation
Support FIPS-enforced Python builds without hashlib.md5 in DigestAuth - #1130
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Any traction on this? Is there more to do? |
|
It's on my radar. Sorry the delay, I'll get to this soon. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
Re-trigger cubic
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
hashlib.md5 in DigestAuth
Summary
MD5 is not a FIPS-approved algorithm, and some FIPS-enforced Python images remove
hashlib.md5entirely. BecauseDigestAuthreferenceshashlib.md5in a class-level dictionary, this causes anAttributeErrorat import time, making the entirehttpx2library unusable on these environments, even if MD5 digest auth is never used.This change conditionally registers the MD5 algorithm entries only when
hashlib.md5is present, so httpx2 can be imported on FIPS-enforced environments while preserving full MD5 digest auth support elsewhere. When a server requests an unavailable algorithm, a clearProtocolErroris raised instead of an opaqueKeyError.Discussion: #1094
Checklist