-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement blake3 cryptographic hash verification for query string #116
Conversation
Apply Sweep Rules to your PR?
|
8b2705a
to
a69bc32
Compare
|
||
let hash = rx.await.unwrap(); | ||
|
||
if hash != qhash { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this isn't a constant-time comparison? In an async context it's harder to predict what the CPU is doing, but it's still good practice from a security perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very small concern in this case, the query hash verification is mainly to prevent bad actors from crafting specialized URLs. (Usually bots) This is also why we only use the first 8 characters, too.
a69bc32
to
830363c
Compare
e945747
to
2aa3053
Compare
No description provided.