[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:
Evan Hunt
2017-07-31 10:43:57 -07:00
parent 913f7528fe
commit 681deaaa39
6 changed files with 150 additions and 108 deletions

View File

@@ -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()