zulip/zerver
Alex Vandiver 49ad188449 rate_limit: Add a flag to lump all TOR exit node IPs together.
TOR users are legitimate users of the system; however, that system can
also be used for abuse -- specifically, by evading IP-based
rate-limiting.

For the purposes of IP-based rate-limiting, add a
RATE_LIMIT_TOR_TOGETHER flag, defaulting to false, which lumps all
requests from TOR exit nodes into the same bucket.  This may allow a
TOR user to deny other TOR users access to the find-my-account and
new-realm endpoints, but this is a low cost for cutting off a
significant potential abuse vector.

If enabled, the list of TOR exit nodes is fetched from their public
endpoint once per hour, via a cron job, and cached on disk.  Django
processes load this data from disk, and cache it in memcached.
Requests are spared from the burden of checking disk on failure via a
circuitbreaker, which trips of there are two failures in a row, and
only begins trying again after 10 minutes.
2021-11-16 11:42:00 -08:00
..
data_import data_import: Ignore Rocket.Chat livechat streams/messages. 2021-11-07 09:50:55 -08:00
integration_fixtures/nagios
lib soft_deactivate: Handle multiple SUBSCRIPTION_DEACTIVATEDs. 2021-11-10 12:19:25 -08:00
management rate_limit: Add a flag to lump all TOR exit node IPs together. 2021-11-16 11:42:00 -08:00
migrations migrations: Disable atomic flag on migration 0354. 2021-11-15 17:24:49 -08:00
openapi openapi: Say message_content_delete_limit_seconds won't be 0 anymore. 2021-11-01 17:17:25 -07:00
tests rate_limit: Add a flag to lump all TOR exit node IPs together. 2021-11-16 11:42:00 -08:00
tornado tornado: Move SIGTERM shutdown handler into a callback. 2021-11-12 09:57:23 -08:00
views email_change: Show deactivated page if realm is now deactivated. 2021-11-14 18:55:40 -08:00
webhooks webhooks/github: Include discussion ID in messages. 2021-10-26 17:52:57 -07:00
worker export: Remove `--delete-after-upload` flag in realm export. 2021-11-03 11:14:02 -07:00
__init__.py django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
apps.py caching: Make sender type optional for flush_cache. 2021-07-26 14:48:07 -07:00
context_processors.py auth: Add login buttons for web public access. 2021-10-05 16:30:40 -07:00
decorator.py rate_limit: Add a flag to lump all TOR exit node IPs together. 2021-11-16 11:42:00 -08:00
filters.py typing: Fix function signatures. 2021-08-20 05:54:19 -07:00
forms.py reset_password: Show user-facing page on rate-limit. 2021-11-04 20:34:39 -07:00
logging_handlers.py logging_handlers: Remove STAGING_ERROR_NOTIFICATIONS setting. 2021-07-07 09:26:02 -07:00
middleware.py lint: Fix typos found by codespell. 2021-10-19 16:51:13 -07:00
models.py models: Add comment documenting how email uniqueness is enforced. 2021-11-15 13:46:28 -08:00
signals.py