mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Cap the number of incrementalMacs populated in an envelope.
Add a remote config `global.maxIncrementalMacsPerEnvelope` (client fallback of 10) that limits how many attachment pointers in a single envelope can have their incrementalMac field populated. Each incrementalMac can be up to 8 KiB, so having too many risks exceeding the 96 KiB envelope size threshold. Excess attachment pointers have their incrementalMac and chunkSize fields stripped.
This commit is contained in:
committed by
jeffrey-signal
parent
6eee4db87b
commit
2bd440e07c
@@ -176,6 +176,7 @@ public class ApplicationDependencyProvider implements AppDependencies.Provider {
|
||||
Optional.of(new SecurityEventListener(context)),
|
||||
SignalExecutors.newCachedBoundedExecutor("signal-messages", ThreadUtil.PRIORITY_IMPORTANT_BACKGROUND_THREAD, 1, 16, 30),
|
||||
RemoteConfig.maxEnvelopeSizeBytes(),
|
||||
RemoteConfig.maxIncrementalMacsPerEnvelope(),
|
||||
RemoteConfig::useMessageSendRestFallback,
|
||||
RemoteConfig.useBinaryId(),
|
||||
BuildConfig.USE_STRING_ID);
|
||||
|
||||
Reference in New Issue
Block a user