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

matmarex created this task.Apr 18 2016, 4:37 PM
Restricted Application added subscribers: Poyekhali, JEumerus, Matanya, Aklapper. · View Herald TranscriptApr 18 2016, 4:37 PM
Dereckson updated the task description. (Show Details)Apr 18 2016, 6:03 PM

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.

Steinsplitter added a comment.EditedApr 18 2016, 6:12 PM

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).

matmarex triaged this task as High priority.Apr 26 2016, 8:37 PM

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

matmarex closed this task as Resolved.May 2 2016, 3:10 PM

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

Rillke added a comment.EditedMay 2 2016, 4:16 PM

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.)