Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add room creation checks to spam checker #2495

Merged
merged 3 commits into from Oct 4, 2017
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Oct 4, 2017

Lets the spam checker deny attempts to create rooms and add aliases
to them.

Lets the spam checker deny attempts to create rooms and add aliases
to them.
@@ -75,6 +80,9 @@ def create_room(self, requester, config, ratelimit=True):
"""
user_id = requester.user.to_string()

if not self.spam_checker.user_may_create_room(user_id):
raise SynapseError(403, "You are not permitted to create rooms")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double indent

@dbkr dbkr merged commit 93b0cf7 into develop Oct 4, 2017
@dbkr dbkr deleted the dbkr/spam_check_room_creation branch October 17, 2017 12:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants