summary refs log tree commit diff
path: root/synapse/api/ratelimiting.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do not apply ratelimiting on joins to appservices (#8139)Will Hunt2020-08-241-0/+37
| | | | | | Add new method ratelimiter.can_requester_do_action and ensure that appservices are exempt from being ratelimited. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Erik Johnston <erik@matrix.org>
* Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-051-35/+118
| | | | | | | | | | While working on https://github.com/matrix-org/synapse/issues/5665 I found myself digging into the `Ratelimiter` class and seeing that it was both: * Rather undocumented, and * causing a *lot* of config checks This PR attempts to refactor and comment the `Ratelimiter` class, as well as encourage config file accesses to only be done at instantiation. Best to be reviewed commit-by-commit.
* Fixup synapse.api to pass mypy (#6733)Erik Johnston2020-01-201-2/+5
|
* Run Black. (#5482)Amber Brown2019-06-201-13/+7
|
* Add ratelimiting on login (#4821)Brendan Abolivier2019-03-151-0/+12
| | | Add two ratelimiters on login (per-IP address and per-userID).
* Add rate-limiting on registration (#4735)Brendan Abolivier2019-03-051-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rate-limiting for registration * Add unit test for registration rate limiting * Add config parameters for rate limiting on auth endpoints * Doc * Fix doc of rate limiting function Co-Authored-By: babolivier <contact@brendanabolivier.com> * Incorporate review * Fix config parsing * Fix linting errors * Set default config for auth rate limiting * Fix tests * Add changelog * Advance reactor instead of mocked clock * Move parameters to registration specific config and give them more sensible default values * Remove unused config options * Don't mock the rate limiter un MAU tests * Rename _register_with_store into register_with_store * Make CI happy * Remove unused import * Update sample config * Fix ratelimiting test for py2 * Add non-guest test
* Port over enough to get some sytests running on Python 3 (#3668)Amber Brown2018-08-201-1/+1
|
* Check whether to ratelimit sooner to avoid workErik Johnston2016-10-191-5/+9
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Update copyright noticesMark Haines2015-01-061-1/+1
|
* fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵Matthew Hodgson2014-09-031-1/+1
| | | | hasn't been incorporated in time for launch.
* Add copyright notices and fix pyflakes errorsMark Haines2014-09-031-1/+15
|
* Test ratelimiterMark Haines2014-09-021-19/+48
|
* Ratelimiter objectMark Haines2014-09-021-0/+36