diff --git a/synapse/events/validator.py b/synapse/events/validator.py index 6c65ce810..63bbc9059 100644 --- a/synapse/events/validator.py +++ b/synapse/events/validator.py @@ -64,6 +64,8 @@ class EventValidator: # Note that only the client controlled portion of the event is # checked, since we trust the portions of the event we created. validate_canonicaljson(event.content) + if not 0 < event.origin_server_ts < 2 ** 53: + raise SynapseError(400, "Event timestamp is out of range") # meow: allow specific users to send potentially dangerous events. if event.sender in config.meow.validation_override: