1
0
mirror of https://github.com/matrix-org/dendrite.git synced 2024-06-12 20:16:43 +00:00

Make federation state request 404 when event not in the room - fixes #625 (#716)

Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
Alex Chen 2019-06-25 18:32:15 +08:00 committed by Andrew Morgan
parent eaf38ae87e
commit b88112b05d

View File

@ -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())