mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-13 20:53:13 +01:00
Enforce state key matches sender
This commit is contained in:
parent
85ede6d64b
commit
e6be7f05c3
1 changed files with 6 additions and 0 deletions
|
@ -194,6 +194,12 @@ func SendJoin(
|
|||
JSON: jsonerror.BadJSON("No state key was provided in the join event."),
|
||||
}
|
||||
}
|
||||
if !event.StateKeyEquals(event.Sender()) {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.BadJSON("Event state key must match the event sender."),
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the room ID is correct.
|
||||
if event.RoomID() != roomID {
|
||||
|
|
Loading…
Reference in a new issue