Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash equals #2871

Merged
merged 3 commits into from
Mar 24, 2021
Merged

Hash equals #2871

merged 3 commits into from
Mar 24, 2021

Conversation

barchetta
Copy link
Member

@barchetta barchetta commented Mar 23, 2021

When comparing message digests it is a best practice to do a full comparison of every byte and not short circuit comparisons when the first difference is found.

This change replaces string comparison in http auth with MessageDigest.isEqual() when comparing message digests.

Fixes #2877

@barchetta barchetta added the 2.x Issues for 2.x version branch label Mar 23, 2021
@barchetta barchetta added this to the 2.3.0 milestone Mar 23, 2021
@barchetta barchetta self-assigned this Mar 23, 2021
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@barchetta barchetta merged commit a318838 into helidon-io:master Mar 24, 2021
paulparkinson pushed a commit that referenced this pull request Mar 29, 2021
* Use MessageDigest.isEqual()
@barchetta barchetta deleted the hash-equals branch March 31, 2021 22:51
aseovic pushed a commit to aseovic/helidon that referenced this pull request Apr 26, 2021
* Use MessageDigest.isEqual()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix hash comparison
2 participants