0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

modules/federation/invite: Check path parameters match event in body.

This commit is contained in:
Jason Volk 2018-04-03 15:11:35 -07:00
parent 60f983b953
commit c929a39795

View file

@ -69,6 +69,20 @@ put__invite(client &client,
request
};
if(at<"event_id"_>(event) != event_id)
throw m::error
{
http::NOT_MODIFIED, "M_MISMATCH_EVENT_ID",
"ID of event in request body does not match the path parameter."
};
if(at<"room_id"_>(event) != room_id)
throw m::error
{
http::NOT_MODIFIED, "M_MISMATCH_ROOM_ID",
"ID of room in request body does not match the path parameter."
};
check_event(request, event);
//TODO: eval()