Page MenuHomePhabricator

Make rate limits work with Wikibase
Closed, ResolvedPublic

Description

The Wikibase API currently bypasses editing limits set via wgRateLimits. wgRateLimits is enforced by User::pingLimiter, which is called from EditPage. But we don't use EditPage.

So, the EditEntity class needs to call User::pingLimiter() to enforce rate limits.


Version: unspecified
Severity: major

Details

Reference
bz47158

Related Objects

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:31 AM
bzimport set Reference to bz47158.
bzimport added a subscriber: Unknown Object (MLST).

This seems one of the many problems caused by bug 18654. Wikidata is probably also affected by bug 33461.

@Nemo: yes, all the controller logic needs to be factored out of EditPage, so it can be re-used.

Our answer to this is to re-implement all the controller logic that is usually performed by EditPage in our EditEntity class - e.g. resolving edit conflicts, checking permissions, etc. So the rate check should go there, too.

Related URL: https://gerrit.wikimedia.org/r/59119 (Gerrit Change I57fb295ca043c70bc754123e97495ead7e01d920)

https://gerrit.wikimedia.org/r/59119 (Gerrit Change I57fb295ca043c70bc754123e97495ead7e01d920) | change APPROVED and MERGED [by Aude]

Related URL: https://gerrit.wikimedia.org/r/59389 (Gerrit Change I57fb295ca043c70bc754123e97495ead7e01d920)

https://gerrit.wikimedia.org/r/59389 (Gerrit Change I57fb295ca043c70bc754123e97495ead7e01d920) | change APPROVED and MERGED [by Daniel Kinzler]