commit 209160ba5804c21b833cb285c26da2789975cb90
Author: Kevin Benton <email address hidden>
Date: Thu Nov 27 01:45:29 2014 -0800
Fix hostname validation for nameservers
Fixes the hostname validation to align with the RFC's demands[1].
This was done by replacing the full regex with a function that
broke the FQDN into individual components that were easier to
reason about with regular expressions.
Also added several test cases for domains so if someone wants
to convert it back to pure regex there will be better test vectors.
1. RFC 1123 says an all-digit hostname is allowed in section 2.1. It
says that this more liberal syntax MUST be supported.
Conflicts:
neutron/tests/unit/test_attributes.py
Closes-Bug: #1396932
Change-Id: I003cf14d95070707e43e40d55da62e11a28dfa4e
(cherry picked from commit 35662d07628452d14306f5197871ad64f6396ff3)
Reviewed: https:/ /review. openstack. org/139061 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=209160ba580 4c21b833cb285c2 6da2789975cb90
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit 209160ba5804c21 b833cb285c26da2 789975cb90
Author: Kevin Benton <email address hidden>
Date: Thu Nov 27 01:45:29 2014 -0800
Fix hostname validation for nameservers
Fixes the hostname validation to align with the RFC's demands[1].
This was done by replacing the full regex with a function that
broke the FQDN into individual components that were easier to
reason about with regular expressions.
Also added several test cases for domains so if someone wants
to convert it back to pure regex there will be better test vectors.
1. RFC 1123 says an all-digit hostname is allowed in section 2.1. It
says that this more liberal syntax MUST be supported.
Conflicts: tests/unit/ test_attributes .py
neutron/
Closes-Bug: #1396932 07e43e40d55da62 e11a28dfa4e 14306f5197871ad 64f6396ff3)
Change-Id: I003cf14d950707
(cherry picked from commit 35662d07628452d