Bläddra i källkod

fix(api): only use resolvable domain names in SOA record

This fixes an issue with SOA record validation of nic.it, which
does not allow the SOA to contain domain names that do not resolve.
Nils Wisiol 4 år sedan
förälder
incheckning
5e4e91c919

+ 1 - 1
api/desecapi/pdns_change_tracker.py

@@ -103,7 +103,7 @@ class PDNSChangeTracker:
                             # SOA retry = refresh
                             # SOA retry = refresh
                             # SOA expire: 4 weeks (all signatures will have expired anyways)
                             # SOA expire: 4 weeks (all signatures will have expired anyways)
                             # SOA minimum: 3600 (for CDS, CDNSKEY, DNSKEY, NSEC3PARAM)
                             # SOA minimum: 3600 (for CDS, CDNSKEY, DNSKEY, NSEC3PARAM)
-                            'content': 'set.an.example. get.desec.io. 1 86400 86400 2419200 3600',
+                            'content': 'get.desec.io. get.desec.io. 1 86400 86400 2419200 3600',
                             'disabled': False
                             'disabled': False
                         }],
                         }],
                     }],
                     }],

+ 1 - 1
api/desecapi/tests/base.py

@@ -740,7 +740,7 @@ class DesecTestCase(MockPDNSTestCase):
 
 
     @classmethod
     @classmethod
     def requests_desec_domain_creation(cls, name=None):
     def requests_desec_domain_creation(cls, name=None):
-        soa_content = 'set.an.example. get.desec.io. 1 86400 86400 2419200 3600'
+        soa_content = 'get.desec.io. get.desec.io. 1 86400 86400 2419200 3600'
         return [
         return [
             cls.request_pdns_zone_create(ns='LORD', payload=soa_content),
             cls.request_pdns_zone_create(ns='LORD', payload=soa_content),
             cls.request_pdns_zone_create(ns='MASTER'),
             cls.request_pdns_zone_create(ns='MASTER'),

+ 1 - 1
api/desecapi/tests/test_rrsets.py

@@ -171,7 +171,7 @@ class AuthenticatedRRSetTestCase(AuthenticatedRRSetBaseTestCase):
                 {'subname': subname, 'records': ['10 example.com.'], 'ttl': 60, 'type': type_}
                 {'subname': subname, 'records': ['10 example.com.'], 'ttl': 60, 'type': type_}
                 for type_ in self.UNSUPPORTED_TYPES
                 for type_ in self.UNSUPPORTED_TYPES
             ] + [
             ] + [
-                {'subname': subname, 'records': ['set.an.example. get.desec.io. 2584 10800 3600 604800 60'],
+                {'subname': subname, 'records': ['get.desec.io. get.desec.io. 2584 10800 3600 604800 60'],
                  'ttl': 60, 'type': type_}
                  'ttl': 60, 'type': type_}
                 for type_ in self.AUTOMATIC_TYPES
                 for type_ in self.AUTOMATIC_TYPES
             ]:
             ]:

+ 1 - 1
api/desecapi/tests/test_rrsets_bulk.py

@@ -123,7 +123,7 @@ class AuthenticatedRRSetBulkTestCase(AuthenticatedRRSetBaseTestCase):
                     {'subname': 'c.1', 'records': ['dead::beef'], 'type': 'AAAA'},
                     {'subname': 'c.1', 'records': ['dead::beef'], 'type': 'AAAA'},
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'AAAA'},
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'AAAA'},
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'SOA',
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'SOA',
-                     'records': ['set.an.example. get.desec.io. 2018034419 10800 3600 604800 60']},
+                     'records': ['get.desec.io. get.desec.io. 2018034419 10800 3600 604800 60']},
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'OPT', 'records': ['9999']},
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'OPT', 'records': ['9999']},
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'TYPE099', 'records': ['v=spf1 mx -all']},
                     {'subname': 'd.1', 'ttl': 3650, 'type': 'TYPE099', 'records': ['v=spf1 mx -all']},
                 ]
                 ]

+ 1 - 1
test/e2e/spec/api_spec.js

@@ -468,7 +468,7 @@ describe("API v1", function () {
                                 {'ttl': 3640, 'type': 'TXT', 'records': ['"bar"']},
                                 {'ttl': 3640, 'type': 'TXT', 'records': ['"bar"']},
                                 {'subname': 'c.1', 'records': ['dead::beef'], 'type': 'AAAA'},
                                 {'subname': 'c.1', 'records': ['dead::beef'], 'type': 'AAAA'},
                                 {'subname': 'd.1', 'ttl': 3650, 'type': 'AAAA'},
                                 {'subname': 'd.1', 'ttl': 3650, 'type': 'AAAA'},
-                                {'subname': 'd.1', 'ttl': 3650, 'type': 'SOA', 'records': ['set.an.example. get.desec.io. 2018034419 10800 3600 604800 60']},
+                                {'subname': 'd.1', 'ttl': 3650, 'type': 'SOA', 'records': ['get.desec.io. get.desec.io. 2018034419 10800 3600 604800 60']},
                                 {'subname': 'd.1', 'ttl': 3650, 'type': 'OPT', 'records': ['9999']},
                                 {'subname': 'd.1', 'ttl': 3650, 'type': 'OPT', 'records': ['9999']},
                                 {'subname': 'd.1', 'ttl': 3650, 'type': 'TYPE099', 'records': ['v=spf1 mx -all']},
                                 {'subname': 'd.1', 'ttl': 3650, 'type': 'TYPE099', 'records': ['v=spf1 mx -all']},
                             ]
                             ]