lower + whoisd

This commit is contained in:
Sebastian Lohff 2017-03-28 13:27:21 +02:00
parent 59285db0c0
commit 5dc73862a2
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ def findInDatabase(rawValue):
# domain?
if rawValue.endswith("DN") or rawValue.endswith("DN."):
value = rawValue
value = rawValue.lower()
if not value.endswith("."):
value += "."

View File

@ -32,7 +32,7 @@ class HandleValidatorWithSuffix(validators.RegexValidator):
def IP46CIDRValidator(value):
if not re.match(r"[0-9a-fA-F:.]+/[0-9]+", value):
raise ValidationError("Address needs to be a subnet in the format of ip/cidr")
raise ValidationError("Address needs to be a subnet in the format of ip/prefix")
try:
ipaddress.ip_network(value)