Constant for max number of canonicalized user ids
This commit is contained in:
@@ -84,6 +84,8 @@ public class UncachedKeyRing implements Serializable {
|
|||||||
final PGPKeyRing mRing;
|
final PGPKeyRing mRing;
|
||||||
final boolean mIsSecret;
|
final boolean mIsSecret;
|
||||||
|
|
||||||
|
private static final int CANONICALIZE_MAX_USER_IDS = 100;
|
||||||
|
|
||||||
UncachedKeyRing(PGPKeyRing ring) {
|
UncachedKeyRing(PGPKeyRing ring) {
|
||||||
mRing = ring;
|
mRing = ring;
|
||||||
mIsSecret = ring instanceof PGPSecretKeyRing;
|
mIsSecret = ring instanceof PGPSecretKeyRing;
|
||||||
@@ -461,7 +463,7 @@ public class UncachedKeyRing implements Serializable {
|
|||||||
// strip out the first found user id with this name
|
// strip out the first found user id with this name
|
||||||
modified = PGPPublicKey.removeCertification(modified, rawUserId);
|
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);
|
log.add(LogType.MSG_KC_UID_TOO_MANY, indent, userId);
|
||||||
// strip out the user id
|
// strip out the user id
|
||||||
modified = PGPPublicKey.removeCertification(modified, rawUserId);
|
modified = PGPPublicKey.removeCertification(modified, rawUserId);
|
||||||
|
|||||||
Reference in New Issue
Block a user