Skip to content

Commit

Permalink
Merge pull request #282 from zakriya057/ITOUDP-4349
Browse files Browse the repository at this point in the history
lower case name in CAA record
  • Loading branch information
miesi-ionos authored Aug 28, 2024
2 parents 06d4c18 + 5fc68d0 commit 9eb5bd0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions dim-testsuite/t/rr-create-caa-2.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$ ndcli create zone a.de
WARNING - Creating zone a.de without profile
WARNING - Primary NS for this Domain is now localhost.

$ ndcli create rr a.de. CAA 2 issue "ca.example.net"
ERROR - CAA Issuer critical only allows values 0, 1, 128
$ ndcli create rr a.de. CAA 0 issuer "ca.example.net"
ERROR - only CAA property tags "issue", "issuewild", "iodef" are allowed

$ ndcli create rr a.de. CAA 0 issue "ca.example.net"
INFO - Creating RR @ CAA 0 issue "ca.example.net" in zone a.de
$ ndcli create rr a.de. CAA 0 issue "Ca.example.net"
INFO - a.de. CAA 0 issue "ca.example.net" already exists

$ ndcli delete rr a.de. CAA 0 issue "ca.example.net"
INFO - Deleting RR @ CAA 0 issue "ca.example.net" from zone a.de
4 changes: 3 additions & 1 deletion dim/dim/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2182,7 +2182,9 @@ def registrar_account_update_zones(self, name):
_update_registrar_keys(zone)

@updating
def rr_create(self, zone=None, views=None, ttl=None, comment=None, profile=False, allow_overlap=False, **kwargs):
def rr_create(self, zone=None, views=None, ttl=None, comment=None, profile=False, allow_overlap=False, **kwargs):
if 'property_value' in kwargs and isinstance(kwargs['property_value'], str) and kwargs['type'] == 'CAA':
kwargs['property_value'] = kwargs['property_value'].lower()
self._rr_create(zone=zone, views=views, ttl=ttl, comment=comment, profile=profile, allow_overlap=allow_overlap,
**kwargs)
return {'messages': Messages.get()}
Expand Down

0 comments on commit 9eb5bd0

Please sign in to comment.