Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add room creation checks to spam checker #2495

Merged
merged 3 commits into from Oct 4, 2017

Conversation

Projects
None yet
2 participants
Member

dbkr commented Oct 4, 2017

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

Add room creation checks to spam checker
Lets the spam checker deny attempts to create rooms and add aliases
to them.
synapse/handlers/room.py
@@ -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")
@erikjohnston

erikjohnston Oct 4, 2017

Owner

double indent

dbkr added some commits Oct 4, 2017

@dbkr dbkr merged commit 93b0cf7 into develop Oct 4, 2017

6 of 8 checks passed

Sytest Dendron (Commit) Build #2700 origin/dbkr/spam_check_room_creation failed in 4 min 30 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #3534 origin/dbkr/spam_check_room_creation succeeded in 4 min 20 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #3628 origin/dbkr/spam_check_room_creation succeeded in 1 min 52 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@dbkr dbkr deleted the dbkr/spam_check_room_creation branch Oct 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment