-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
synapse accepted an event with no prev_events #9799
Comments
What room is this from? |
not really sure that's relevant |
It's relevant for the context of this issue, what's the event contents? Which server did it come from? How does it look like? Under what circumstances was it inserted/accepted into the database? Is it a |
It is a member event and was created on an older conduit version |
Does synapse currently have any check that should prevent this? |
my logic goes:
|
That makes sense, but it is not in the spec. The spec just says "If type is m.room.create: If it has any previous events, reject." but not the other way around. My theory (without looking at the synapse code) is that synapse wants to get the state at the event, but can't find it (as there are no prev events), so it uses /state_ids, which works and then the event with no prev events gets into the DAG |
The same bit of the spec also says:
If you don't have any state, the sender doesn't have a current membership. |
As I said in my last message, Synapse will probably still get the state by calling /state_ids on the event. That other server might pretend to know the state at the event even though there are no prev events |
well, that would be the bug, then. |
Well servers have to rely on /state_ids sometimes. You can't expect them to fetch ALL prev events, that would take far too long (because you need to fetch the prev events of the prev events too to get their state etc) |
We're currently using this empty |
Related to #8094 |
$39VZNdyICR1_8rHvEnuOU9-J6rZ0J4aWEsHpOggBK8o
has no prev_events but was accepted onmatrix.org
this sounds bogus.
The text was updated successfully, but these errors were encountered: