From a7bbc46eb9979ec4d35694d046bc8c52209592cc Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Sat, 7 Feb 2015 04:27:51 +1100 Subject: [PATCH] Streamlining the patch back down to a single line. Since the keyid should always match the master key, regardless of whether there's a subkey or not, reduced this to simply make keyid be the last 16 chars of the master key's fingerprint. --- plugins/User/plugin.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/User/plugin.py b/plugins/User/plugin.py index 172bdecc4..39a03a089 100644 --- a/plugins/User/plugin.py +++ b/plugins/User/plugin.py @@ -524,15 +524,9 @@ class User(callbacks.Plugin): 'Authentication aborted.'), Raise=True) verified = gpg.keyring.verify(data) if verified and verified.valid: - keyid0 = verified.key_id - fprint = verified.pubkey_fingerprint - kprint = fprint[-16:] + keyid = verified.pubkey_fingerprint[-16:] prefix, expiry = self._tokens.pop(token) found = False - if keyid0 == kprint: - keyid = keyid0 - else: - keyid = kprint for (id, user) in ircdb.users.items(): if keyid in [x[-len(keyid):] for x in user.gpgkeys]: try: