Page MenuHomePhabricator

Importing abuse filter fails as invalid
Closed, ResolvedPublic


Steps to reproduce:
Click export and copy the text
Paste the text

Expected result:
Import works, or at least a clear warning why not

Actual result:

The data you tried to import is not valid

Filter content:

{"row":{"af_id":"65","af_pattern":"page_id == 0 \u0026\r\nuser_editcount \u003C 5 \u0026\r\npage_namespace == 0 \u0026\r\nnew_size \u003E 500 \u0026\r\n!contains_any(added_lines, \"[[\", \"{{\", \"{|\", \"==\", \"\u003Cref\", \"''\")","af_user":"14443205","af_user_text":"94rain","af_timestamp":"20191109124036","af_enabled":"1","af_comments":"testing\r\n\r\nUpdated deprecated variables - DannyS712 23 August 2019\r\nDisabled, testing filter no longer being used; please re-enable if desired --DannyS712 2 September 2019\r\n\r\nRe-enabled: adapted from [[:en:Special:AbuseFilter/180]] unwikified new page, probably out-of-scope content, only observe mainspace for now -- 94rain, 9 Nov 2019","af_public_comments":"Test filter","af_hidden":"0","af_hit_count":"1785","af_throttled":"0","af_deleted":"0","af_actions":"","af_global":"0","af_group":"default"},"actions":[]}

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald Transcript

Change 595166 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] ViewEdit: account for empty actions in imported data

Daimona added a subscriber: Daimona.

at least a clear warning why not

Note that the format in which data is exported/imported is internal, and the user is not expected to craft it manually, hence there's no detailed error message.

Change 595166 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] ViewEdit: account for empty actions in imported data