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.
This commit is contained in:
Ben McGinnes 2015-02-07 04:27:51 +11:00
parent 861efee8f2
commit a7bbc46eb9

View File

@ -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: