diff options
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java | 9 |
1 files changed, 5 insertions, 4 deletions
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 7c640efb8..17d35dc1f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java @@ -366,6 +366,11 @@ public class UncachedKeyRing { for (byte[] rawUserId : new IterableIterator<byte[]>(masterKey.getRawUserIDs())) { String userId = Utf8Util.fromUTF8ByteArrayReplaceBadEncoding(rawUserId); + // warn if user id was made with bad encoding + if (!Utf8Util.isValidUTF8(rawUserId)) { + log.add(LogType.MSG_KC_UID_WARN_ENCODING, indent); + } + // check for duplicate user ids if (processedUserIds.contains(userId)) { log.add(LogType.MSG_KC_UID_DUP, @@ -437,10 +442,6 @@ public class UncachedKeyRing { badCerts += 1; continue; } - // warn user if the signature was made with bad encoding - if (!Utf8Util.isValidUTF8(rawUserId)) { - log.add(LogType.MSG_KC_UID_WARN_ENCODING, indent); - } } catch (PgpGeneralException e) { log.add(LogType.MSG_KC_UID_BAD_ERR, indent, userId); |