Details
-
Bug
-
Status: Done
-
Major
-
Resolution: Done
-
None
-
None
Description
Currently, the REPL defines a valid zookeeper hostname is one which matches a regex rather than defining it as a hostname which is reachable by the machine. Combining this with the fact that the regex to validate the hostname is denying valid hostnames:
@Test public void testBadPattern() throws Exception { Pattern validHostNamePattern = Pattern.compile( "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)" + "*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])$"); Assert.assertFalse(validHostNamePattern.matcher("gzcf0.fold.blarg.com").matches()); Assert.assertTrue(validHostNamePattern.matcher("host1").matches()); }
Attachments
Issue Links
- links to