X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-mailgate;h=b23e8a520d58d4bffbc4ac04c3bc36c97460a88c;hp=427a024a7493fa83661870473690dc3d1d3ba8e4;hb=1fba345532896a49d61b365dbbe5fa52135f2ab3;hpb=e13094c6dcebe4f8fec69963212942d49d3e2ac2 diff --git a/ud-mailgate b/ud-mailgate index 427a024..b23e8a5 100755 --- a/ud-mailgate +++ b/ud-mailgate @@ -39,7 +39,7 @@ SeenList = {} DNS = {} ValidHostNames = [] # will be initialized in later -SSHFingerprint = re.compile('^(\d+) ([0-9a-f\:]{47}) (.+)$') +SSHFingerprint = re.compile('^(\d+) ([0-9a-f\:]{47}|SHA256:[0-9A-Za-z/+]{43}) (.+)$') SSHRSA1Match = re.compile('^^(.* )?\d+ \d+ \d+') GenderTable = {"male": '1', @@ -322,6 +322,8 @@ def DoSSH(Str, Attrs, badkeys, uid): Subst["__USER__"] = uid Match = SSHFingerprint.match(output) + if Match is None: + return "Failed to match SSH fingerprint, has the output of ssh-keygen changed?" g = Match.groups() key_size = g[0] fingerprint = g[1]