From 8750a51bb3597aa0687e06221f21412b18004c58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Thu, 22 Jul 2010 16:42:52 -0400 Subject: [PATCH] both hostnames and mail addresses should composed by lowercase letters --- PLC/Nodes.py | 1 + PLC/Persons.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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: -- 2.43.0