Make sure that invalid join rules returns a 403

This commit is contained in:
Neil Alexander 2021-11-11 14:01:49 +00:00
parent 3300effe39
commit 9ea8dc71eb
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -245,7 +245,7 @@ func (r *Joiner) performJoinRoomByID(
// builder content. // builder content.
if restricted, roomIDs, rerr := r.checkIfRestrictedJoin(ctx, req); rerr != nil { if restricted, roomIDs, rerr := r.checkIfRestrictedJoin(ctx, req); rerr != nil {
return "", "", &rsAPI.PerformError{ return "", "", &rsAPI.PerformError{
Code: rsAPI.PerformErrorBadRequest, Code: rsAPI.PerformErrorNotAllowed,
Msg: rerr.Error(), Msg: rerr.Error(),
} }
} else if restricted { } else if restricted {