mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 16:14:49 -04:00
Apply some limits to depth to counter abuse
* When creating a new event, cap its depth to 2^63 - 1 * When receiving events, reject any without a sensible depth As per https://docs.google.com/document/d/1I3fi2S-XnpO45qrpCsowZv8P8dHcNZ4fsBsbOW7KABI
This commit is contained in:
parent
28dd536e80
commit
33f469ba19
3 changed files with 26 additions and 4 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue