From 5dc73862a2d6414ac8fbf4c48892f26395e439af Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Tue, 28 Mar 2017 13:27:21 +0200 Subject: [PATCH] lower + whoisd --- whoisdb/helpers.py | 2 +- whoisdb/validators.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/whoisdb/helpers.py b/whoisdb/helpers.py index 0fe8429..a2ed3a0 100644 --- a/whoisdb/helpers.py +++ b/whoisdb/helpers.py @@ -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 += "." diff --git a/whoisdb/validators.py b/whoisdb/validators.py index bf62130..fc081ae 100644 --- a/whoisdb/validators.py +++ b/whoisdb/validators.py @@ -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)