From: rmurray <> Date: Thu, 20 Mar 2003 03:08:58 +0000 (+0000) Subject: fix character classes to be happy with python 2.1 X-Git-Tag: debian_userdir-ldap_0-3-7~68 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=dfc52faac997626810139f7a4b0f5c0cc5d6fcaf fix character classes to be happy with python 2.1 --- 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;