This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1521,6 +1521,9 @@ async def _check_event_auth(
15211521 )
15221522
15231523 # ... and check that the event passes auth at those auth events.
1524+ # https://spec.matrix.org/v1.3/server-server-api/#checks-performed-on-receipt-of-a-pdu:
1525+ # 4. Passes authorization rules based on the event’s auth events,
1526+ # otherwise it is rejected.
15241527 try :
15251528 await check_state_independent_auth_rules (self ._store , event )
15261529 check_state_dependent_auth_rules (event , claimed_auth_events )
@@ -1531,7 +1534,10 @@ async def _check_event_auth(
15311534 context .rejected = RejectedReason .AUTH_ERROR
15321535 return context
15331536
1534- # now check auth against what we think the auth events *should* be.
1537+ # now check the auth rules pass against the room state before the event
1538+ # https://spec.matrix.org/v1.3/server-server-api/#checks-performed-on-receipt-of-a-pdu:
1539+ # 5. Passes authorization rules based on the state before the event,
1540+ # otherwise it is rejected.
15351541 event_types = event_auth .auth_types_for_event (event .room_version , event )
15361542 prev_state_ids = await context .get_prev_state_ids (
15371543 StateFilter .from_types (event_types )
You can’t perform that action at this time.
0 commit comments