From ff144c7c116c0690406139315b2c0fa5ed8aab4a Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sat, 4 Oct 2014 11:14:02 +0200 Subject: canonicalize: compare user ids as string rather than bytes --- .../java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java index e37ebeaa7..7c640efb8 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java @@ -362,18 +362,18 @@ public class UncachedKeyRing { } } - ArrayList processedUserIds = new ArrayList(); + ArrayList processedUserIds = new ArrayList(); for (byte[] rawUserId : new IterableIterator(masterKey.getRawUserIDs())) { String userId = Utf8Util.fromUTF8ByteArrayReplaceBadEncoding(rawUserId); // check for duplicate user ids - if (processedUserIds.contains(rawUserId)) { + if (processedUserIds.contains(userId)) { log.add(LogType.MSG_KC_UID_DUP, indent, userId); // strip out the first found user id with this name modified = PGPPublicKey.removeCertification(modified, rawUserId); } - processedUserIds.add(rawUserId); + processedUserIds.add(userId); PGPSignature selfCert = null; revocation = null; -- cgit v1.2.3