Skip to content

Move public room call invite mitigations to filter_events_for_client #17359

Open
@anoadragon453

Description

@anoadragon453

This bit of code filters out call invite events in public rooms to prevent someone from being able to ring hundreds of people by sending a call event:

loaded_recents = []
for event in filtered_recents:
if event.type == EventTypes.CallInvite:
room_info = await self.store.get_room_with_stats(event.room_id)
assert room_info is not None
if room_info.join_rules == JoinRules.PUBLIC:
continue
loaded_recents.append(event)

@MadLittleMods asks whether it can be moved to filter_events_for_client rather than its current spot in _load_filtered_recents, so that the new native sliding sync implementation can utilise it (#16908 (comment)). Another alternative is to soft_fail the call invites.

Metadata

Metadata

Assignees

Labels

A-SyncT-TaskZ-Dev-Wishlistgood first issueThis is a fix that might be an easy place for someone to start for their first contribution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions