Lower per-app NotificationChannelGroup limit.

A higher limit can be abused to cause PDoS.

For the rationale behind choosing 6000 as the max value, see
http://b/261723753#comment20.

Test: atest PreferencesHelperTest
Bug: 261723753
Change-Id: I3f3a99765c161369e1b026686a0e5f0c83ed839e
This commit is contained in:
Ioana Alexandru
2023-01-10 10:51:21 +00:00
parent f5bf900a96
commit 86441bd5c0

View File

@@ -108,7 +108,7 @@ public class PreferencesHelper implements RankingConfig {
@VisibleForTesting
static final int NOTIFICATION_CHANNEL_COUNT_LIMIT = 5000;
@VisibleForTesting
static final int NOTIFICATION_CHANNEL_GROUP_COUNT_LIMIT = 50000;
static final int NOTIFICATION_CHANNEL_GROUP_COUNT_LIMIT = 6000;
private static final int NOTIFICATION_PREFERENCES_PULL_LIMIT = 1000;
private static final int NOTIFICATION_CHANNEL_PULL_LIMIT = 2000;