mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 23:48:27 +00: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."),
|
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.
|
// Check that the room ID is correct.
|
||||||
if event.RoomID() != roomID {
|
if event.RoomID() != roomID {
|
||||||
|
|
Loading…
Reference in a new issue