Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c94ea39 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

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
(cherry picked from commit 86441bd5)
parent f8dcd6ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;