Page MenuHomePhabricator

Convert Commons filter 140 to a $wgRateLimits configuration
Closed, ResolvedPublic

Description

I'd like to convert Commons abuse filter 140 to a $wgRateLimits configuration.

This will probably result in a tiny performance improvement, but more importantly, it will allow tools like UploadWizard to display a better error message to the user. Right now UploadWizard doesn't handle AbuseFilter very well (T132866), but even if it did, it wouldn't be able to display a localised error message or the custom one from MediaWiki:Abusefilter-warning-ut (the API doesn't provide this information, the only information you get is the filter description). The throttle also wouldn't be triggered for uploads to stash (T87381), which currently effectively halves the limit for UploadWizard users.

The only problem I see is that Commons administrators would no longer be able to configure the throttle on wiki (you'd have to have a site configuration change deployed).

Filter parameters

DescriptionUpload throttle
Hits27,454 hits
Conditions!("autopatrol" in user_rights) & action == "upload"
Number of actions to allow380
Period of time4320 seconds
Group throttle byusers
System messageabusefilter-warning-ut
ActionsPrevent the user from performing the action in question

Event Timeline

Not really an issue to move the setting from wiki to the config: @Steinsplitter tweaked the values in August and Septembre 2015, now it's stable.

The throttle is mainly to prevent abusive mass uploads. IMHO it would be fine move the setting from wiki to the config.

I was going to post a note at https://commons.wikimedia.org/wiki/Commons:Administrators'_noticeboard, but it looks like hardly anyone other than Steinsplitter and Rillke maintains Commons' filters, so I won't bother everyone else. I'll probably do this next-week-ish (depending on when I get around to T132920).

Change 285700 had a related patch set uploaded (by Bartosz Dziewoński):
Set $wgRateLimits['upload'] for Commons

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

(This doesn't strictly depend on T132920, UploadWizard handles both the current config and the proposed config equally terribly at the moment.)

Change 285700 merged by jenkins-bot:
Set $wgRateLimits['upload'] for Commons

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

Deployed. @Steinsplitter, filter 140 can be disabled/deleted now, if you could. :)

Deployed. @Steinsplitter, filter 140 can be disabled/deleted now, if you could. :)

Already deleted.

That one only tags the files and doesn't prevent uploading, so it has to be done with AbuseFilter. (It's also private, for some reason, and all our configuration is public.)