summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-04-23 19:20:44 +0100
committerGitHub <noreply@github.com>2021-04-23 19:20:44 +0100
commit3ff225175462dde8376aa584e3a47c43b1f0e790 (patch)
tree550b35fb107b0af201c0e409818d9630d8d3a599 /synapse/api
parentKill off `_PushHTTPChannel`. (#9878) (diff)
downloadsynapse-3ff225175462dde8376aa584e3a47c43b1f0e790.tar.xz
Improved validation for received requests (#9817)
* Simplify `start_listening` callpath

* Correctly check the size of uploaded files
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 31a59bceec..936b6534b4 100644
--- a/synapse/api/constants.py
+++ b/synapse/api/constants.py
@@ -17,6 +17,9 @@
 
 """Contains constants from the specification."""
 
+# the max size of a (canonical-json-encoded) event
+MAX_PDU_SIZE = 65536
+
 # the "depth" field on events is limited to 2**63 - 1
 MAX_DEPTH = 2 ** 63 - 1