0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-14 03:03:50 +01: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 return nil, resErr
} }
if event.RoomID() != roomID {
return nil, &util.JSONResponse{Code: http.StatusNotFound, JSON: nil}
}
prevEventIDs := getIDsFromEventRef(event.PrevEvents()) prevEventIDs := getIDsFromEventRef(event.PrevEvents())
authEventIDs := getIDsFromEventRef(event.AuthEvents()) authEventIDs := getIDsFromEventRef(event.AuthEvents())