fix(fed): dont reject /event_auth/
on world readable rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
197a02bf8d
commit
d10bc67c9d
1 changed files with 12 additions and 8 deletions
|
@ -17,7 +17,16 @@ pub(crate) async fn get_event_authorization_route(
|
|||
) -> Result<get_event_authorization::v1::Response> {
|
||||
let origin = body.origin.as_ref().expect("server is authenticated");
|
||||
|
||||
services()
|
||||
.rooms
|
||||
.event_handler
|
||||
.acl_check(origin, &body.room_id)?;
|
||||
|
||||
if !services()
|
||||
.rooms
|
||||
.state_accessor
|
||||
.is_world_readable(&body.room_id)?
|
||||
&& !services()
|
||||
.rooms
|
||||
.state_cache
|
||||
.server_in_room(origin, &body.room_id)?
|
||||
|
@ -25,11 +34,6 @@ pub(crate) async fn get_event_authorization_route(
|
|||
return Err(Error::BadRequest(ErrorKind::forbidden(), "Server is not in room."));
|
||||
}
|
||||
|
||||
services()
|
||||
.rooms
|
||||
.event_handler
|
||||
.acl_check(origin, &body.room_id)?;
|
||||
|
||||
let event = services()
|
||||
.rooms
|
||||
.timeline
|
||||
|
|
Loading…
Add table
Reference in a new issue