Page MenuHomePhabricator

Create Special page to manage lists of URLs
Open, Needs TriagePublic

Description

Background

This is a proposed feature enhancement to the work that went into T337431: Rework MediaWiki:SpamBlacklist. That project is about introducing a much more user-friendly means to manage the old Spamblacklist, which before was a giant wikitext page full of regular expressions. The problem is that in this case, admins almost never need regular expressions, rather just the top-level domain or maybe a subdomain. A simple UI to add/remove domains with an optional comment is more than sufficient.

Similar to Spamblacklist, there is a URL ignore list at User:CopyPatrolBot/UrlIgnoreList that is used by CopyPatrol. Here we list Wikipedia mirrors and other sites that frequently show up as possible copyright violations, when in actuality they're a backwards copy of Wikpedia. It would be great if users of CopyPatrol could take advantage of the same UI that is used by Special:BlockedExternalDomains, given some people aren't comfortable with regex. Functionally what we want is the same, the only difference being we want the list saved to a different JSON page.

There may be other use cases beyond CopyPatrol and Spamblacklist, too. For example, as part of the EditCheck project, we may want a machine-readable list of unreliable sites that can easily be maintained by the community (T276857).

Proposal

Abstract out the UI from Special:BlockedExternalDomains into a general purpose manager of JSON pages that list URLs/domains. This could be called Special:EditUrlList, and accept a path of the page in question, such as Special:EditUrlList/Pagename.json.

Special:BlockedExternalDomains (which lives in AbuseFilter) can simply extend the Special page class for Special:EditUrlList, adding the relevant interface messages and changing the title. Or, it could simply redirect to Special:EditUrlList/MediaWiki:BlockedExternalDomains.json. The usual permission checks should be added, ensuring the editor has rights to edit the target JSON page.

This new Special page could perhaps live in MediaWiki Core, as it seems a bit too broad to keep in AbuseFilter, especially if other extensions will come to rely on it.