Protect from no auth events for non-existent provided prev_event
This commit is contained in:
parent
ec35be57e0
commit
bc0ba8c094
|
@ -131,6 +131,14 @@ class RoomBatchSendEventRestServlet(RestServlet):
|
|||
prev_event_ids_from_query
|
||||
)
|
||||
|
||||
if not auth_event_ids:
|
||||
raise SynapseError(
|
||||
HTTPStatus.BAD_REQUEST,
|
||||
"No auth events found for given prev_event query parameter. The prev_event=%s probably does not exist."
|
||||
% prev_event_ids_from_query,
|
||||
errcode=Codes.INVALID_PARAM,
|
||||
)
|
||||
|
||||
# Create and persist all of the state events that float off on their own
|
||||
# before the batch. These will most likely be all of the invite/member
|
||||
# state events used to auth the upcoming historical messages.
|
||||
|
|
Loading…
Reference in a new issue