Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
046a6513
Unverified
Commit
046a6513
authored
2 years ago
by
Shay
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't process /send requests for users who have hit their ratelimit (#13134)
parent
8330fc99
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/13134.misc
+1
-0
1 addition, 0 deletions
changelog.d/13134.misc
synapse/handlers/message.py
+3
-0
3 additions, 0 deletions
synapse/handlers/message.py
with
4 additions
and
0 deletions
changelog.d/13134.misc
0 → 100644
+
1
−
0
View file @
046a6513
Apply ratelimiting earlier in processing of /send request.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
synapse/handlers/message.py
+
3
−
0
View file @
046a6513
...
@@ -903,6 +903,9 @@ class EventCreationHandler:
...
@@ -903,6 +903,9 @@ class EventCreationHandler:
await
self
.
clock
.
sleep
(
random
.
randint
(
1
,
10
))
await
self
.
clock
.
sleep
(
random
.
randint
(
1
,
10
))
raise
ShadowBanError
()
raise
ShadowBanError
()
if
ratelimit
:
await
self
.
request_ratelimiter
.
ratelimit
(
requester
,
update
=
False
)
# We limit the number of concurrent event sends in a room so that we
# We limit the number of concurrent event sends in a room so that we
# don't fork the DAG too much. If we don't limit then we can end up in
# don't fork the DAG too much. If we don't limit then we can end up in
# a situation where event persistence can't keep up, causing
# a situation where event persistence can't keep up, causing
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment