Rate limit: the count of windows over the limit never expires, moderators end up blocked
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start with security/rate_limiting.py and trace how ratelimit_times and ratelimit_last_blocked_window are updated, then check the configuration for rate_limiting.max_times and rate_limiting.limit_moderator. The issue proposes several policy choices, including an optional moderator limit change, so first identify existing tests for rate limiting and moderator behavior. Done means the chosen policy is implemented and covered by tests for counter expiry and moderator responses.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The write rate limit (security/rate_limiting.py) counts, for each user, the 15-minute windows in which they went over their limit (ratelimit_times). Once that count goes over rate_limiting.max_times (3), the account is blocked (blocked = true).
ratelimit_times never goes back down: only a moderator unblocking the account (POST /users/unblock) resets it. Four busy windows over the whole life of an account are enough for a block, even months apart.
This now hits moderators doing normal moderation work. The image duplicates tab (#2735) and the orphan images tab invite many writes in a row (merge, delete, dismiss), and the moderator limit is 100 writes per 15 minutes. On 2026-11-25 a moderator working through the duplicates tab got 429 "Rate limit reached" with ratelimit_times = 3: one more window would have blocked their account. Their counters were reset by hand in the database.
Proposal
- Make the count expire: reset
ratelimit_timeswhen the last window over the limit (ratelimit_last_blocked_window) is older than some period (e.g. 24 h), so only repeated abuse in a short time blocks an account. - Never block moderators automatically (still answer 429 and send the alert mail): a moderator account is known, and blocking it also stops the moderation tools.
- Optionally raise
rate_limiting.limit_moderator(100 per 15 min).
Related: #1925 (the alert mails).
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 30
- Merge medio
- 10h 18m
- PR unite (30g)
- 195
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di c2corg/v6_api
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
metaskirando
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
metaskirando
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
metaskirando
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di c2corg/v6_api
Issue simili
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
MakazhanAlpamys/Soup#3589 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/clickhouse-connect#1266 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
biosustain/growthcurves_app#89 ·
I maintainer di solito rispondono entro 1 giorno
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
canonical/loki-k8s-operator#695 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
scrapinghub/dateparser#1617 ·
I maintainer di solito rispondono entro 1 giorno