This commit is contained in:
Andrew Ferrazzutti 2024-06-27 15:25:54 -04:00
parent a949455520
commit c8aae9832c

View file

@ -829,8 +829,7 @@ def _can_send_event(event: "EventBase", auth_events: StateMap["EventBase"]) -> b
if hasattr(event, "state_key"):
if event.state_key.startswith("@"):
if event.state_key != event.user_id and (
not use_msc3779
or not event.state_key.startswith(event.user_id + "_")
not use_msc3779 or not event.state_key.startswith(event.user_id + "_")
):
raise AuthError(403, "You are not allowed to set others state")