mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
canonicalize: compare user ids as string rather than bytes
This commit is contained in:
parent
2b5341f0d4
commit
ff144c7c11
@ -362,18 +362,18 @@ public class UncachedKeyRing {
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<byte[]> processedUserIds = new ArrayList<byte[]>();
|
||||
ArrayList<String> processedUserIds = new ArrayList<String>();
|
||||
for (byte[] rawUserId : new IterableIterator<byte[]>(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;
|
||||
|
Loading…
Reference in New Issue
Block a user