Update from samosa: Only use SSH2AuthSplit.match(), maybe it's superior?
[mirror/userdir-ldap.git] / ud-mailgate
index 680b14d..ebb5d45 100755 (executable)
@@ -161,11 +161,9 @@ def DoPosition(Str,Attrs):
 # Handle an SSH authentication key, the line format is:
 #  [options] 1024 35 13188913666680[..] [comment]
 def DoSSH(Str,Attrs):
-   Match = SSHAuthSplit.match(Str);
+   Match = SSH2AuthSplit.match(Str);
    if Match == None:
-      Match = SSH2AuthSplit.match(Str);
-      if Match == None:
-         return None;
+      return None;
    
    global SeenKey;
    if SeenKey:
@@ -360,7 +358,8 @@ try:
    Msg = GetClearSig(Email);
 
    ErrMsg = "Message is not PGP signed:"
-   if string.find(Msg[0],"-----BEGIN PGP SIGNED MESSAGE-----") == -1:
+   if string.find(Msg[0],"-----BEGIN PGP SIGNED MESSAGE-----") == -1 and \
+      string.find(Msg[0],"-----BEGIN PGP MESSAGE-----") == -1:
       raise Error, "No PGP signature";
    
    # Check the signature