Constant for max number of canonicalized user ids
This commit is contained in:
parent
8f40c6df51
commit
2b735102f7
|
@ -84,6 +84,8 @@ public class UncachedKeyRing implements Serializable {
|
|||
final PGPKeyRing mRing;
|
||||
final boolean mIsSecret;
|
||||
|
||||
private static final int CANONICALIZE_MAX_USER_IDS = 100;
|
||||
|
||||
UncachedKeyRing(PGPKeyRing ring) {
|
||||
mRing = ring;
|
||||
mIsSecret = ring instanceof PGPSecretKeyRing;
|
||||
|
@ -461,7 +463,7 @@ public class UncachedKeyRing implements Serializable {
|
|||
// strip out the first found user id with this name
|
||||
modified = PGPPublicKey.removeCertification(modified, rawUserId);
|
||||
}
|
||||
if (processedUserIds.size() > 100) {
|
||||
if (processedUserIds.size() > CANONICALIZE_MAX_USER_IDS) {
|
||||
log.add(LogType.MSG_KC_UID_TOO_MANY, indent, userId);
|
||||
// strip out the user id
|
||||
modified = PGPPublicKey.removeCertification(modified, rawUserId);
|
||||
|
|
Loading…
Reference in a new issue