Page MenuHomePhabricator

UploadWizard reports uploads blocked by AbuseFilter as 'verification-error' ("This file might be corrupt, or have the wrong extension")
Closed, ResolvedPublic

Description

UploadWizard reports actions blocked by AbuseFilter as 'verification-error' ("This file might be corrupt, or have the wrong extension").

For example, trying to upload one of the files blocked by Commons' filter 31: (https://commons.wikimedia.org/wiki/Special:AbuseFilter/31)

pasted_file (946×1 px, 131 KB)

The API response actually has some marginally useful information we could display:

{
  "servedby": "mw1198",
  "error": {
    "code": "verification-error",
    "info": "This file did not pass file verification: This action has been automatically identified as harmful, and therefore disallowed.\nIf you believe your action was constructive, please inform an administrator of what you were trying to do.\nA brief description of the abuse rule which your action matched is: Frequently uploaded non-free files by SHA1",
    "details": [
      "abusefilter-disallowed",
      "Frequently uploaded non-free files by SHA1",
      31
    ],
    "*": "See https://commons.wikimedia.org/w/api.php for API usage"
  }
}

Event Timeline

Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript
matmarex triaged this task as Medium priority.Apr 26 2016, 8:36 PM

I think that ideally, uploads blocked by AbuseFilter should be reported with a different error altogether. That would require work in AF and maybe core too first.

Change 296348 had a related patch set uploaded (by Bartosz Dziewoński):
Correctly report uploads blocked by AbuseFilter

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

Change 296348 merged by jenkins-bot:
Correctly report uploads blocked by AbuseFilter

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