mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:55:04 -04:00
Move some event auth checks out to a different method (#13065)
* Add auth events to events used in tests * Move some event auth checks out to a different method Some of the event auth checks apply to an event's auth_events, rather than the state at the event - which means they can play no part in state resolution. Move them out to a separate method. * Rename check_auth_rules_for_event Now it only checks the state-dependent auth rules, it needs a better name.
This commit is contained in:
parent
cba1c5cbc2
commit
8ecf6be1e1
7 changed files with 219 additions and 98 deletions
|
@ -330,7 +330,7 @@ def _resolve_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_auth_rules_for_event(
|
||||
event_auth.check_state_dependent_auth_rules(
|
||||
event,
|
||||
auth_events.values(),
|
||||
)
|
||||
|
@ -347,7 +347,7 @@ def _resolve_normal_events(
|
|||
for event in _ordered_events(events):
|
||||
try:
|
||||
# The signatures have already been checked at this point
|
||||
event_auth.check_auth_rules_for_event(
|
||||
event_auth.check_state_dependent_auth_rules(
|
||||
event,
|
||||
auth_events.values(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue