mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 19:22:14 -05:00
Move utf8 check for user id upwards
This commit is contained in:
parent
27d062496f
commit
678265483a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user