Repository navigation
test: leak checks match whole words, not letters inside random key hashes - #74
Merged
Merged
Conversation
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.
Fixes a flaky test. Test-only change; no CHANGELOG line.
test_boundary_supersedefailed in CI on #65 withassert 'bus' not in stack.stored_text(). The dump of every stored value includes PBKDF2 key hashes, and one of them held...GdGbusxe.... The same risk applied to "gym", "chess" and "grey" in three other tests.The fix is a new
memory_stack.holds_word(dump, word), a case-insensitive whole-word search. A leaked sentence or a stored token (["bus"]) still fails the check; letters inside a hash or id no longer do. The four short-word checks use it now; checks for long phrases and marks are unchanged.Tests: the four files, 19 passed + 1 new test that pins the helper on the hash from the failed run.