diff --git a/federationapi/routing/state.go b/federationapi/routing/state.go index 58398bde9..86cf1cf54 100644 --- a/federationapi/routing/state.go +++ b/federationapi/routing/state.go @@ -103,6 +103,10 @@ func getState( return nil, resErr } + if event.RoomID() != roomID { + return nil, &util.JSONResponse{Code: http.StatusNotFound, JSON: nil} + } + prevEventIDs := getIDsFromEventRef(event.PrevEvents()) authEventIDs := getIDsFromEventRef(event.AuthEvents())