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

View File

@@ -0,0 +1,12 @@
/*
* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// Zone policy that uses a numeric name
zone "99example.test" {
coverage 6mo;
};