Update regex to disallow leading zeros

Also updated a comment to point to a non-experimental RFC.

Signed-off-by: jbzdarkid <jbzdarkid@gmail.com>
This commit is contained in:
jbzdarkid
2021-03-17 18:09:03 -07:00
parent 89c80947df
commit 8090071eff
2 changed files with 13 additions and 3 deletions

View File

@@ -555,6 +555,14 @@ def test_validate_ip(Pihole):
test_address('8.8.8.8:65535')
test_address('8.8.8.8:65536', False)
test_address('8.8.8.8:-1', False)
test_address('00.0.0.0', False)
test_address('010.0.0.0', False)
test_address('001.0.0.0', False)
test_address('0.0.0.0:00', False)
test_address('0.0.0.0:01', False)
test_address('0.0.0.0:001', False)
test_address('0.0.0.0:0001', False)
test_address('0.0.0.0:00001', False)
def test_os_check_fails(Pihole):