From dfc52faac997626810139f7a4b0f5c0cc5d6fcaf Mon Sep 17 00:00:00 2001 From: rmurray <> Date: Thu, 20 Mar 2003 03:08:58 +0000 Subject: [PATCH] fix character classes to be happy with python 2.1 --- ud-mailgate | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ud-mailgate b/ud-mailgate index e8bff01..916ea6b 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -180,14 +180,14 @@ def DoSSH(Str,Attrs): # host in a 12.12.12.12 # host in cname foo.bar. <- Trailing dot is required def DoDNS(Str,Attrs,DnRecord): - cname = re.match("^[\w-]+\s+in\s+cname\s+[\w.\-]+\.$",Str,re.IGNORECASE); - if re.match('^[\w-]+\s+in\s+a\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$',\ + cname = re.match("^[-\w]+\s+in\s+cname\s+[-\w.]+\.$",Str,re.IGNORECASE); + if re.match('^[-\w]+\s+in\s+a\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$',\ Str,re.IGNORECASE) == None and cname == None and \ - re.match("^[\w-]+\s+in\s+mx\s+\d{1,3}\s+[\w.\-]+\.$",Str,re.IGNORECASE) == None: + re.match("^[-\w]+\s+in\s+mx\s+\d{1,3}\s+[-\w.]+\.$",Str,re.IGNORECASE) == None: return None; # Check if the name is already taken - G = re.match('^([\w-+]+)\s',Str).groups(); + G = re.match('^([-\w+]+)\s',Str).groups(); # Check for collisions global l; -- 2.20.1