mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Only check invite auth events for local invites
This commit is contained in:
parent
3d3979cfff
commit
a45c76c491
|
|
@ -137,7 +137,9 @@ func (r *RoomserverInternalAPI) processInviteEvent(
|
||||||
|
|
||||||
event := input.Event.Unwrap()
|
event := input.Event.Unwrap()
|
||||||
|
|
||||||
// check that the user is allowed to do this
|
// check that the user is allowed to do this. We can only do this check if it is
|
||||||
|
// a local invite as we have the auth events, else we have to take it on trust.
|
||||||
|
if loopback != nil {
|
||||||
_, err = checkAuthEvents(ctx, r.DB, input.Event, input.Event.AuthEventIDs())
|
_, err = checkAuthEvents(ctx, r.DB, input.Event, input.Event.AuthEventIDs())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).WithField("event_id", event.EventID()).WithField("auth_event_ids", event.AuthEventIDs()).Error(
|
log.WithError(err).WithField("event_id", event.EventID()).WithField("auth_event_ids", event.AuthEventIDs()).Error(
|
||||||
|
|
@ -151,6 +153,7 @@ func (r *RoomserverInternalAPI) processInviteEvent(
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(input.InviteRoomState) > 0 {
|
if len(input.InviteRoomState) > 0 {
|
||||||
// If we were supplied with some invite room state already (which is
|
// If we were supplied with some invite room state already (which is
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue