-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: input validation for RRSIG.Verify() #1618
base: master
Are you sure you want to change the base?
Conversation
dnssec.go
Outdated
if !strings.EqualFold(rr.SignerName, k.Hdr.Name) { | ||
|
||
signerName := CanonicalName(rr.SignerName) | ||
if !strings.EqualFold(signerName, k.Hdr.Name) { |
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.
i dont think equalFold is correct for use in DNS....
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.
Hi, thanks for reviewing! This function use is identical to what's being used in master now:
Line 373 in b77d1ed
if !strings.EqualFold(rr.SignerName, k.Hdr.Name) { |
What's the correct version you would suggest? Would ==
do? I can make the patch.
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.
@developStorm
equal
should be what you want.
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.
Maybe not a perfect fix, but this attempts to resolve #1617.
Also introduces tests to ensure compliance with RFC 4035.