Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix possible variable shadow in create_new_client_event (#14575)
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay authored Nov 29, 2022
1 parent 9ccc09f commit 72f3e38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/14575.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a possible variable shadow in `create_new_client_event`.
6 changes: 4 additions & 2 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,11 +1135,13 @@ async def create_new_client_event(
)
state_events = await self.store.get_events_as_list(state_event_ids)
# Create a StateMap[str]
state_map = {(e.type, e.state_key): e.event_id for e in state_events}
current_state_ids = {
(e.type, e.state_key): e.event_id for e in state_events
}
# Actually strip down and only use the necessary auth events
auth_event_ids = self._event_auth_handler.compute_auth_events(
event=temp_event,
current_state_ids=state_map,
current_state_ids=current_state_ids,
for_verification=False,
)

Expand Down

0 comments on commit 72f3e38

Please sign in to comment.