projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f05e3f0
)
fix character classes to be happy with python 2.1
author
rmurray
<>
Thu, 20 Mar 2003 03:08:58 +0000
(
03:08
+0000)
committer
rmurray
<>
Thu, 20 Mar 2003 03:08:58 +0000
(
03:08
+0000)
ud-mailgate
patch
|
blob
|
history
diff --git
a/ud-mailgate
b/ud-mailgate
index
e8bff01
..
916ea6b
100755
(executable)
--- 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):
# 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 \
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
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;
# Check for collisions
global l;