Enforce state key matches sender
This commit is contained in:
parent
85ede6d64b
commit
e6be7f05c3
|
@ -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