diff options
author | Erik Johnston <erikj@jki.re> | 2019-01-28 20:09:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-28 20:09:38 +0000 |
commit | f1a04462ebfde48cbd42c42f05d67710a7f5955c (patch) | |
tree | 3bfb7acd4b72f69bc27299e19e37a133bea6bb63 /synapse/state/v1.py | |
parent | Fix worker TLS (#4492) (diff) | |
parent | Correctly use default room version if none is set (diff) | |
download | synapse-f1a04462ebfde48cbd42c42f05d67710a7f5955c.tar.xz |
Merge pull request #4482 from matrix-org/erikj/event_auth_room_version
Pass through room version to event auth
Diffstat (limited to 'synapse/state/v1.py')
-rw-r--r-- | synapse/state/v1.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/synapse/state/v1.py b/synapse/state/v1.py index 19e091ce3b..6d3afcae7c 100644 --- a/synapse/state/v1.py +++ b/synapse/state/v1.py @@ -21,7 +21,7 @@ from six import iteritems, iterkeys, itervalues from twisted.internet import defer from synapse import event_auth -from synapse.api.constants import EventTypes +from synapse.api.constants import EventTypes, RoomVersions from synapse.api.errors import AuthError logger = logging.getLogger(__name__) @@ -274,7 +274,11 @@ def _resolve_auth_events(events, auth_events): auth_events[(prev_event.type, prev_event.state_key)] = prev_event try: # The signatures have already been checked at this point - event_auth.check(event, auth_events, do_sig_check=False, do_size_check=False) + event_auth.check( + RoomVersions.V1, event, auth_events, + do_sig_check=False, + do_size_check=False, + ) prev_event = event except AuthError: return prev_event @@ -286,7 +290,11 @@ def _resolve_normal_events(events, auth_events): for event in _ordered_events(events): try: # The signatures have already been checked at this point - event_auth.check(event, auth_events, do_sig_check=False, do_size_check=False) + event_auth.check( + RoomVersions.V1, event, auth_events, + do_sig_check=False, + do_size_check=False, + ) return event except AuthError: pass |