mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 02:38:03 +01:00
Control inbound message byte limits with a dynamic configuration flag
This commit is contained in:
committed by
Jon Chambers
parent
e87468fbe0
commit
b8d8d349f4
@@ -226,7 +226,13 @@ public class MessageController {
|
||||
totalContentLength += contentLength;
|
||||
}
|
||||
|
||||
rateLimiters.getInboundMessageBytes().validate(destinationUuid, totalContentLength);
|
||||
try {
|
||||
rateLimiters.getInboundMessageBytes().validate(destinationUuid, totalContentLength);
|
||||
} catch (final RateLimitExceededException e) {
|
||||
if (dynamicConfigurationManager.getConfiguration().getInboundMessageByteLimitConfiguration().enforceInboundLimit()) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
boolean isSyncMessage = source.isPresent() && source.get().getAccount().isIdentifiedBy(destinationUuid);
|
||||
|
||||
Reference in New Issue
Block a user