alexdalitz / dnsruby

Dnsruby is a feature-complete DNS(SEC) client for Ruby, as used by many of the world's largest DNS registries and the OpenDNSSEC project
Other
194 stars 77 forks source link

Add issuemail CAA record support #193

Closed rdoherty-fastly closed 2 months ago

rdoherty-fastly commented 3 months ago

When a hostname has an issuemail record, DNSRuby throws an error:

dig +short CAA esmt.org
0 issuemail "pki.dfn.de"
0 issuewild "sectigo.com"
0 issue "sectigo.com"
0 issue "pki.dfn.de"
0 issuemail "sectigo.com"
0 issue "letsencrypt.org"
resolver.query('esmt.org', 'CAA')
NoMethodError: undefined method `[]' for nil:NilClass
from /usr/local/lib/ruby/gems/3.0.0/gems/dnsruby-1.61.5/lib/dnsruby/resource/CAA.rb:47:in `from_string'

The issuemail record is a relatively new RFC: https://datatracker.ietf.org/doc/rfc9495/

I think I did this right, lmk what can be improved/changed!

alexdalitz commented 3 months ago

Thank you!I’m in the French alps just now but will look at this and respond early next week.Thanks again!Sent from my iPhoneOn 10 Apr 2024, at 22:32, Ryan Doherty @.***> wrote:When a hostname has an issuemail record, DNSRuby throws an error: dig +short CAA esmt.org 0 issuemail "pki.dfn.de" 0 issuewild "sectigo.com" 0 issue "sectigo.com" 0 issue "pki.dfn.de" 0 issuemail "sectigo.com" 0 issue "letsencrypt.org"

resolver.query('esmt.org', 'CAA') NoMethodError: undefined method []' for nil:NilClass from /usr/local/lib/ruby/gems/3.0.0/gems/dnsruby-1.61.5/lib/dnsruby/resource/CAA.rb:47:infrom_string'

The issuemail record is a relatively new RFC: https://datatracker.ietf.org/doc/rfc9495/ I think I did this right, lmk what can be improved/changed!

You can view, comment on, or merge this pull request online at:   https://github.com/alexdalitz/dnsruby/pull/193

Commit Summary

0feacc5 Add issuemail CAA record support

File Changes (2 files)

M
lib/dnsruby/resource/CAA.rb
(2)

M
test/tc_caa.rb
(1)

Patch Links:

https://github.com/alexdalitz/dnsruby/pull/193.patch https://github.com/alexdalitz/dnsruby/pull/193.diff

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

alexdalitz commented 2 months ago

Looks good to me - thanks! Let me know if you need this in a release.

rdoherty-fastly commented 2 months ago

Thank you @alexdalitz ! Yeah it would be nice to get this in a release soon, our application that uses this Gem is unable to do some DNS checks that it needs to do and is impacting our customers. Thank you!

alexdalitz commented 2 months ago

OK - v1.72.1 is out now with this fix included

rdoherty-fastly commented 2 months ago

Thank you @alexdalitz !