From 0feacc5aecedf2b1c511980771ebd3750fdc0424 Mon Sep 17 00:00:00 2001 From: Ryan Doherty Date: Wed, 10 Apr 2024 13:32:03 -0700 Subject: [PATCH] Add issuemail CAA record support --- lib/dnsruby/resource/CAA.rb | 2 +- test/tc_caa.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dnsruby/resource/CAA.rb b/lib/dnsruby/resource/CAA.rb index fd64e44..0ac5e8e 100644 --- a/lib/dnsruby/resource/CAA.rb +++ b/lib/dnsruby/resource/CAA.rb @@ -43,7 +43,7 @@ def flag end def from_string(input) #:nodoc: all - matches = (/(\d+) (issuewild|issue|iodef|contactemail|contactphone) "(.+)"$/).match(input) + matches = (/(\d+) (issuewild|issuemail|issue|iodef|contactemail|contactphone) "(.+)"$/).match(input) @flag = matches[1] @property_tag = matches[2] @property_value = matches[3] diff --git a/test/tc_caa.rb b/test/tc_caa.rb index 80a4b96..2221ea4 100644 --- a/test/tc_caa.rb +++ b/test/tc_caa.rb @@ -25,6 +25,7 @@ def test_caa {'foo.com. IN CAA 0 issue "ca.example.net"' => [0, 'issue', 'ca.example.net'], 'foo.com. IN CAA 1 issue "ca.example.net"' => [1, 'issue', 'ca.example.net'], 'foo.com. IN CAA 0 issuewild "ca.example.net"' => [0, 'issuewild', 'ca.example.net'], + 'foo.com. IN CAA 0 issuemail "ca.example.net"' => [0, 'issuemail', 'ca.example.net'], 'foo.com. IN CAA 0 iodef "mailto:security@example.com"' => [0, 'iodef', 'mailto:security@example.com'], 'foo.com. IN CAA 0 issue "ca.example.net; account=230123"' => [0, 'issue', 'ca.example.net; account=230123'] }.each do |text, data|