This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
StateFilter.must_await_full_state
falls over if called on a StateFilter
s for membership events with a bogus state key
#13040
Labels
P4
(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Sentry:
https://sentry.tools.element.io/organizations/element/issues/124/events/d3c32827e3264d689cd3985618361192/?project=2&query=firstRelease%3A1.61.0rc1&sort=freq#tags
Matrix.org received a request of the form
GET /_matrix/client/r0/rooms/ROOM_IDstate/m.room.member/foo@example.com
. After checking the requester is in the room, we lookup the given state key in our server's view of the room.:synapse/synapse/handlers/message.py
Lines 127 to 130 in a164a46
This constructs a StateFilter looking for events matching that (type, state_key) pair.
synapse/synapse/storage/controllers/state.py
Lines 479 to 488 in 7c6b220
We eventually fall into
must_await_full_state
. Because the event is a membership event, we check to see if the sender is local.synapse/synapse/storage/state.py
Lines 561 to 566 in 7c6b220
But
is_mind_id
throws because the given state_key doesn't contain a colon.synapse/synapse/server.py
Lines 339 to 341 in 1e45305
Options that spring to mind:
is_mine_id
. Any failure means the fancy faster join stuff is not available.Related: #12489. I don't think this is directly related to faster joins; rather it's collateral damage? Might be of interest to @richvdh anyway.
The text was updated successfully, but these errors were encountered: