Repository navigation
Replace MD5 cache filenames with SHA-256 - #534
Open
DurgaTharshini26 wants to merge 2 commits into
Open
DurgaTharshini26 wants to merge 2 commits into
DurgaTharshini26 wants to merge 2 commits into
Conversation
|
Thanks for the first pull request here. CI needs a maintainer to approve the run before it starts, so it may sit for a bit before anything happens. |
NovaCode37
requested changes
Oct 10, 2026
NovaCode37
left a comment
Owner
There was a problem hiding this comment.
The SHA-256 change in web/app.py is exactly what #388 asks for, thanks.
The description says the SHA-1 call in modules/leak_lookup.py now has usedforsecurity=False, but that file is not in the diff. Please add it, it is the last bullet of the issue.
Small one: tests/test_cache_hash.py needs two blank lines between the imports and the first test, flake8 is happy now only because the file has no lint gate on it.
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
usedforsecurity=Falsefor the SHA-1 hash used by the Have I Been Pwned range API, preserving its required hashing behavior.Changes Made
_cache_key()inweb/app.pyto generate SHA-256-based cache filenames.modules/leak_lookup.pyto explicitly mark it as non-security usage.Testing
tests/test_cache_hash.py.git diff --checkreports no errors.web/.Cache Compatibility
Existing MD5-named cache files will no longer be used. Cache entries will be regenerated naturally when needed; no migration is required.
Closes #388