Page MenuHomePhabricator

BlockedExternalDomains.json / Special:BlockedExternalDomains: Save username and addition time for each entry
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
At https://en.wikipedia.org/wiki/MediaWiki:BlockedExternalDomains.json / https://en.wikipedia.org/wiki/Special:BlockedExternalDomains , please automatically log the addition's time and username in separate fields.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
The list may become searchable later, but its edit history is stored separately. It may be easy to find an entry even if the list grows to a million entries, but it won't be easy to find out who performed the addition. This is why a "Notes" field exists, which could else just be a part of the revision history in form of an edit summary.

Benefits (why should this be implemented?):

  • Less tedious process for creating a comprehensive log
  • Standardization instead of a custom workaround
  • Separating metadata from content
  • The feature is new and improving it will probably be easier now than later.

Event Timeline

ToBeFree updated the task description. (Show Details)

This came up in T337431: Rework MediaWiki:SpamBlacklist and I'm worried it would make it an easy target for by-stander newcomer spammer to start harassing admins. They are still public in the history of the json page, but not in the face. One suggestion was to only show it if the user has certain rights (let's say admin). I think an easy solution would be to allow parsing of signature and allow each wiki to decide what they want to do with it.

I'd be fine if it would just append it to notes really - doesn't seem like there are any devs that are up to work on this or T343360 right now though?

I'm planning to work on it during the holidays (it's my volunteer project 🙁). I have some ideas on how to fix this.

Change 985645 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/AbuseFilter@master] Blocked domains: Add support for "added by" field

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

Addition of user is done in this patch, addition of time is much more complex, for example, the time is pre-save and it might end up in a different day then the actual save. Timezones are another mess. How important it is to store the date and if there is a way to avoid it? In German Wikipedia, they have a js script to add it automatically to the end of notes.

"server time" should suffice? (e.g. the results of a ~~~~~)

"server time" should suffice? (e.g. the results of a ~~~~~)

That could work, the biggest issue is that it will be unstructured and not really sortable which you would expect from a timestamp column but maybe meh? Maybe I go bother Sam (PM of moderators team) for a decision.

Change 985645 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Blocked domains: Add support for "added by" field

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

As the "username" part of this has been delivered now just the timestamp portion is outstanding

"server time" should suffice? (e.g. the results of a ~~~~~)

That could work, the biggest issue is that it will be unstructured and not really sortable which you would expect from a timestamp column but maybe meh? Maybe I go bother Sam (PM of moderators team) for a decision.

If sorting is a concern, same value but format as logs should be fine (e.g. yyyy-mm-ddThh:mm:ss) - which will natively sort as a string

yes, please use iso time format and no local formats.
iso has a lot of advantages, e.g., it's alpha-sortable, it's international, it's easily readable by spam-fighters from other wikis, it begins with the most important part (the year).

at dewiki we use that already in the _notes_ field (as a workaround): https://de.wikipedia.org/wiki/Special:BlockedExternalDomains

Alternatively in BlockedExternalDomains.json we can just store a UTC timestamp such as 20250101000000 which will be parsed in special page

"server time" should suffice? (e.g. the results of a ~~~~~)

That could work, the biggest issue is that it will be unstructured and not really sortable which you would expect from a timestamp column but maybe meh? Maybe I go bother Sam (PM of moderators team) for a decision.

My off-the-cuff opinion, in case it's helpful, is that the precise timestamp is less important than having a timestamp. Whatever time we can get, in UTC, would seem good enough to me, unless I'm missing something :)

Is the precise time that important to users beyond the date? Perhaps some of the issue could be resolved by just storing the date if so.

No, for example being very slightly off the revision timestamp should be no big deal. Ideally they would match, or be very close. (If the timestamp has to be calculated and submitted, instead of using a magic keyword like ~~~~~).