summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-05-01 18:14:18 +0100
committerRichard van der Hoff <richard@matrix.org>2018-05-01 18:14:18 +0100
commitd5eee5d601cb291bcd6eb409f818c0e27a1658b0 (patch)
tree8c71771ba723609335feb16568fe0b540a33d451 /synapse/api
parentMiscellaneous fixes to python_dependencies (diff)
parentApply some limits to depth to counter abuse (diff)
downloadsynapse-d5eee5d601cb291bcd6eb409f818c0e27a1658b0.tar.xz
Merge commit '33f469b' into release-v0.28.1
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/constants.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py
index 489efb7f86..5baba43966 100644
--- a/synapse/api/constants.py
+++ b/synapse/api/constants.py
@@ -16,6 +16,9 @@
 
 """Contains constants from the specification."""
 
+# the "depth" field on events is limited to 2**63 - 1
+MAX_DEPTH = 2**63 - 1
+
 
 class Membership(object):