[go: up one dir, main page]

Page MenuHomePhabricator

Simple per-IP ratelimit for HTML stashing
Closed, ResolvedPublic

Description

The stashing feature should be rate limited per-user or per-ip. I guess we could use User::pingLimiter (probably extract the functionality into a MW service object).

Implementation idea:

  • add a checkRateLimit( $action ) method to the Authority interface. Note that $action is similar to but not quite the same as $action on probablyCan() and friends.
  • UserAuthority can implement checkRateLimit by calling User::pingLimiter for now. Eventually, this logic should be factored into a service object.
  • PageHTMLHandler::postValidationSetup should call getAuthority and pass the authority to the ParsoidHTMLHelper.
  • ParsoidHTMLHelper::getHTML should call checkRateLimit( 'stash-base-html' ) on the authroity object.

Event Timeline

Adding Platform Engineering as Platform Team Workboards (Green) was archived and as open tasks should have an active project tag

Change 801384 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[mediawiki/core@master] WIP: Add rate limiter for stashing HTML

https://gerrit.wikimedia.org/r/801384

DAlangi_WMF changed the task status from Open to In Progress.Jun 1 2022, 11:59 AM

Change 805091 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] WIP: add rate limiting to ParsoidHTMLHelper

https://gerrit.wikimedia.org/r/805091

Change 805091 merged by jenkins-bot:

[mediawiki/core@master] Add rate limiting to ParsoidHTMLHelper

https://gerrit.wikimedia.org/r/805091

Change 801384 abandoned by D3r1ck01:

[mediawiki/core@master] WIP: Add support for rate limiting in Authority

Reason:

Superseded by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/809295

https://gerrit.wikimedia.org/r/801384