Use pulp_hashlib in receive_artifact()#2258
Merged
Merged
Conversation
3 tasks
0b8fa67 to
adf021f
Compare
mdellweg
requested changes
Mar 11, 2026
Member
mdellweg
left a comment
There was a problem hiding this comment.
This sounds right to me.
The changelog should contain just about enough information for the user to connect the dots (Seeing the UnsupportedDigestmodError e.g. with this bugfix.). Also it's supposed to be a snippet in a mkdocs markdown file.
Replace raw hashlib with pulp_hashlib.new() so that digest creation goes through the allowed-algorithm gate and works on FIPS-enabled systems. closes pulp#2256 Signed-off-by: Kush Gupta <kushalgupta@gmail.com> Made-with: Cursor
adf021f to
3c8292e
Compare
Contributor
Author
|
Thanks for the review @mdellweg ! Updated the changelog to what you suggested and amended the commit to include it, let me know if you'd like any other changes! |
mdellweg
approved these changes
Mar 11, 2026
Member
mdellweg
left a comment
There was a problem hiding this comment.
Nope that's fine. Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hashlibwithpulp_hashlib.new()inreceive_artifact()so digest creation goes through the allowed-algorithm gate and works on FIPS-enabled systems.Artifact.DIGEST_FIELDSwith rawhashlib, bypassing thepulp_hashlibwrapper. Other rawhashlib.sha256()calls elsewhere are FIPS-safe.UnsupportedDigestmodError/ HTTP 500 before the fix, HTTP 201 after.pulp_hashlibmd5 patch is sufficient oncereceive_artifact()routes through it.Checklist
closes #2256
Made with Cursor