From: S.Çağlar Onur Date: Thu, 22 Jul 2010 20:42:52 +0000 (-0400) Subject: both hostnames and mail addresses should composed by lowercase letters X-Git-Tag: plcapi-4.3-36~3 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=8750a51bb3597aa0687e06221f21412b18004c58 both hostnames and mail addresses should composed by lowercase letters --- diff --git a/PLC/Nodes.py b/PLC/Nodes.py index 46fb99a..28ff8c1 100644 --- a/PLC/Nodes.py +++ b/PLC/Nodes.py @@ -88,6 +88,7 @@ class Node(Row): tags = { } def validate_hostname(self, hostname): + hostname = hostname.lower() if not valid_hostname(hostname): raise PLCInvalidArgument, "Invalid hostname" diff --git a/PLC/Persons.py b/PLC/Persons.py index 1d3059f..d35f9f7 100644 --- a/PLC/Persons.py +++ b/PLC/Persons.py @@ -78,7 +78,7 @@ class Person(Row): """ Validate email address. Stolen from Mailman. """ - + email = email.lower() invalid_email = PLCInvalidArgument("Invalid e-mail address") if not email: