[master] parse numeric domain names correctly
4666. [bug] dnssec-keymgr: Domain names beginning with digits (0-9) could cause a parser error when reading the policy file. This now works correctly so long as the domain name is quoted. [RT #45641]
This commit is contained in:
@@ -78,5 +78,12 @@ class PolicyTest(unittest.TestCase):
|
||||
'(5184000/5184000) combined exceed '
|
||||
'rollover period 7776000'))
|
||||
|
||||
def test_numeric_zone(self):
|
||||
pol = policy.dnssec_policy()
|
||||
pol.load('test-policies/05-numeric-zone.pol')
|
||||
|
||||
p = pol.policy('99example.test', novalidate=True)
|
||||
self.assertEqual(p.validate(), (True, ""))
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user