X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-mailgate;h=6f9b20cfc5fb2bb7e8b1f810b0cbeda88f295653;hp=05756aa2ff367885c75fd8a7e5a847c61f107e10;hb=f22595d6909859cae31bb8a33ad24b50e74cb89a;hpb=88af9a92351e2f54f020aa8f587913da0fb8b98d diff --git a/ud-mailgate b/ud-mailgate index 05756aa..6f9b20c 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -490,7 +490,7 @@ def DoRBL(Str,Attrs): # Handle a ConfirmSudoPassword request def DoConfirmSudopassword(Str, SudoPasswd): - Match = re.compile('^confirm sudopassword ('+UUID_FORMAT+') ([a-z0-9.,*]+) ([0-9a-f]{40})$').match(Str) + Match = re.compile('^confirm sudopassword ('+UUID_FORMAT+') ([a-z0-9.,*-]+) ([0-9a-f]{40})$').match(Str) if Match == None: return None @@ -517,7 +517,7 @@ def FinishConfirmSudopassword(l, uid, Attrs, SudoPasswd): newldap = [] for entry in inldap: - Match = re.compile('^('+UUID_FORMAT+') (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*]+) ([^ ]+)$').match(entry) + Match = re.compile('^('+UUID_FORMAT+') (confirmed:[0-9a-f]{40}|unconfirmed) ([a-z0-9.,*-]+) ([^ ]+)$').match(entry) if Match == None: raise UDFormatError, "Could not parse existing sudopasswd entry" uuid = Match.group(1)