Page MenuHomePhabricator

Enable mass deletion of pages created by all temporary accounts which were used by an IP address
Closed, ResolvedPublic5 Estimated Story Points

Description

User story: As an administrator, I want to delete all pages created by an individual using a single IP address who used multiple temporary accounts, so that I can easily remove bad pages from my Wikimedia project.

Background

T340631: Does Nuke need substantial feature changes to retain current functionality with IP Masking?

When a temporary account is created for a user, a cookie with a 90 day expiration is created, during which time their contributions will be associated with this temporary account. Clearing the cookie will give the user a new temporary account on their next edit, even when they continue editing from the same IP address. Changing IP address will not change the user's temporary account. As such, a temporary account can be associated with multiple IP addresses over its lifespan (T325456).

Nuke is an extension which enables administrators to delete all pages created by a specific user or IP address and/or matching a particular page name pattern. This is used when a user - often a vandal - has created a large number of pages which need to be deleted, saving administrators time compared to deleting them individually. Per T341564, 33% of Nuke deletions target an unregistered user. On many wikis this is as high as 40-50%.

With the introduction of temporary accounts and their per-user cookies, Nuke will actually be more effective against users who do not delete their cookies, as simply changing IP address will not move the user to a new 'account'. However, it also opens up a new attack vector for bad actors on our wikis. Preventing/deleting cookies is considerably easier for most users than cycling IP addresses, especially on a regular cadence or after each edit. It takes a very short amount of time to add Wikipedia to your browser's cookie-blocking list, at which point every edit will come from a new temporary account.

As such, we want to ensure that if a user disables cookies from Wikipedia, or clears them on a regular basis, and they vandalise a project by creating a large number of new pages, Nuke is still able to delete those pages. This will not be effective if the user also cycles their IP address, but this is already true.

Since administrators will need to opt-in to view the IP addresses associated with a temporary account, we should not allow them to use Nuke on an IP address until they have opted-in. This will only cause legacy-IP issues for ~30 days after temporary accounts are deployed, since IP page creations will no longer be in the recentchanges table after then.

Mockups

Figma

Current

Frame 1 (2).png (721×4 px, 124 KB)

New

New.png (1×4 px, 252 KB)

Per T355178, Nuke should display a message to users who attempt to run Nuke on an IP address but have not opted-in to the Temporary Account preference. This message should be available to other tools to use also:

You do not have permission to take this action on IP addresses. To enable this action please opt-in to the 'Temporary account IP reveal' setting in your preferences.

preferences should link to Special:Preferences.

Technical approach

We will use the API created in T354542: Create new Rest API endpoint that takes an IP address and returns temporary accounts that have used that address to do the lookup, provided the user has the relevant permission.

Acceptance criteria

When Temporary Accounts is enabled on a project ...

  • Entering a temporary account name into Special:Nuke should fetch pages created by all temporary accounts used by that IP address.

[] Pages should be listed without explicitly linking them to an IP address or temporary account. (per T342785#10241270 it is OK to display the temporary account name next to the page)

  • In this case the default edit summary should be "Mass deletion of pages added by temporary accounts."
  • The default nuke-tools message should be changed to "This tool allows for mass deletions of pages recently added by a given user or temporary account. Input a username or IP address to get a list of pages to delete, or leave blank for all users. Inputting an IP address will list all pages created by temporary accounts used from that IP address."
  • Where we currently show the nuke-list message, when a temporary account has been filtered on we should instead show a new message: "The following pages were recently created by temporary accounts which were used from the IP address $1. Please select which pages to delete, provide an edit summary, and click 'Delete selected' to initiate page deletion. For privacy reasons, please do not write the IP address in the edit summary.\n\nRedirects are displayed in italics."

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Dreamy_Jazz changed the task status from Stalled to Open.Jul 23 2024, 10:52 AM
Dreamy_Jazz subscribed.

T354542 is just waiting for QA, so this should be unblocked.

We'll aim to work on this in October and have it out before the October 29th temporary account deployment.

jsn.sherman moved this task from Blocked to To be estimated on the Moderator-Tools-Team board.
jsn.sherman set the point value for this task to 5.Oct 2 2024, 5:37 PM
jsn.sherman changed the task status from Open to In Progress.Oct 10 2024, 4:45 PM
jsn.sherman moved this task from Ready to In Progress on the Moderator-Tools-Team (Kanban) board.

Change #1079564 had a related patch set uploaded (by Jsn.sherman; author: Jsn.sherman):

[mediawiki/extensions/Nuke@master] [WIP]: Enable nuking of temp accounts associated with IP

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

Noting that for the moment, my solution varies from the mockups; I'm reusing the check user error page rather than display a message above the form:

image.png (350×685 px, 30 KB)

Also, my "revert reason" does not have punctuation like the mockup, since none of the other reasons include punctuation.

@Samwalton9-WMF product question: I'm currently just putting ip pages and related temp account pages all together and treating them like temp account pages in the list without distinguishing between them. That way existing pages can still be mass deleted along side new temp account pages. Is that okay? Should we amend interface text to make that clear?

jsn.sherman renamed this task from Enable Nuking of pages created by all temporary accounts which were used by an IP address to Enable mass deletion of pages created by all temporary accounts which were used by an IP address.Oct 16 2024, 3:44 PM

@Samwalton9-WMF product question: I'm currently just putting ip pages and related temp account pages all together and treating them like temp account pages in the list without distinguishing between them. That way existing pages can still be mass deleted along side new temp account pages. Is that okay? Should we amend interface text to make that clear?

Yeah I think that's fine - if I understand correctly this is a problem for a maximum of 30 days, while IP-created pages drop out of Recent Changes right?

I suppose this changes a little if we implement T33858: [SPIKE] Investigate using the Revision table instead of Recent Changes for Nuke, to allow deleting older pages [16HRS] but we could worry about this then.

here's what we're looking at right now:

image.png (578×761 px, 51 KB)

image.png (627×761 px, 103 KB)

Note that the list in the second screenshot contains both ip user created pages as well as temp account user created pages.

When we don't have the combination of temp accounts and CheckUser, the current behavior is maintained.

Change #1081107 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[integration/config@master] zuul: Add CheckUser as a test and phan dependency of Nuke

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

Change #1081108 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/Nuke@master] build: Add phan config loading for CheckUser

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

Change #1081107 merged by jenkins-bot:

[integration/config@master] zuul: Add CheckUser as a test and phan dependency of Nuke

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

Change #1081136 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/Nuke@master] SpecialNuke: Fix display of username

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

Change #1081108 merged by jenkins-bot:

[mediawiki/extensions/Nuke@master] build: Add phan config loading for CheckUser

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

Pages should be listed without explicitly linking them to an IP address or temporary account.

@Samwalton9-WMF @Niharika I would like to better understand the motivation for this.

If I use Special:Nuke on and input the IP address 1.2.3.4, I will get a list of recent pages created by temporary accounts from that IP address. It is then trivial to visit each page in that list and identify the creator of the page, to identify which temporary account is associated with IP 1.2.3.4. (This is also why we generate a log entry, to indicate that a user has viewed temporary accounts associated with the IP address.)

If we do not display the temporary account name, we do not present critical information to the operator of the tool. For example, if IP address 1.2.3.4 has a single temporary account associated with it, it's pretty obvious that I can move forward with deleting the pages. But if there are dozens of temporary accounts from a busy IP address, then there is a higher risk of collateral damage. If we do not show the temporary account names next to the pages, it is very easy for the operator of Special:Nuke to not notice this.

Another reason to show the username next to the page is so that it's easy to see the block status of the account that created the page.

So in short, the information is obtainable through manually clicking through to each page, and I am not sure why we wouldn't make it easier for the operator of Special:Nuke to see inline, as it would reduce the risk of collateral damage and provide more useful context for anti-abuse work.

Pages should be listed without explicitly linking them to an IP address or temporary account.

@Samwalton9-WMF @Niharika I would like to better understand the motivation for this.

If I use Special:Nuke on and input the IP address 1.2.3.4, I will get a list of recent pages created by temporary accounts from that IP address. It is then trivial to visit each page in that list and identify the creator of the page, to identify which temporary account is associated with IP 1.2.3.4. (This is also why we generate a log entry, to indicate that a user has viewed temporary accounts associated with the IP address.)

If we do not display the temporary account name, we do not present critical information to the operator of the tool. For example, if IP address 1.2.3.4 has a single temporary account associated with it, it's pretty obvious that I can move forward with deleting the pages. But if there are dozens of temporary accounts from a busy IP address, then there is a higher risk of collateral damage. If we do not show the temporary account names next to the pages, it is very easy for the operator of Special:Nuke to not notice this.

Another reason to show the username next to the page is so that it's easy to see the block status of the account that created the page.

So in short, the information is obtainable through manually clicking through to each page, and I am not sure why we wouldn't make it easier for the operator of Special:Nuke to see inline, as it would reduce the risk of collateral damage and provide more useful context for anti-abuse work.

This makes sense to me! I was perhaps being over-cautious with respect to linking IP addresses and temporary accounts.

This makes sense to me! I was perhaps being over-cautious with respect to linking IP addresses and temporary accounts.

given that only admins (who qualify for IP Reveal) can access Special:Nuke, I don't think this is an issue – although I wonder if it's ok to link IP and temporary account at Special:Nuke, if the admin didn't agree to the Access to Temporary Account IP Addresses Policy via Special:Preferences.

Change #1079564 merged by jenkins-bot:

[mediawiki/extensions/Nuke@master] Enable temp account lookup by IP address

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

This makes sense to me! I was perhaps being over-cautious with respect to linking IP addresses and temporary accounts.

given that only admins (who qualify for IP Reveal) can access Special:Nuke, I don't think this is an issue – although I wonder if it's ok to link IP and temporary account at Special:Nuke, if the admin didn't agree to the Access to Temporary Account IP Addresses Policy via Special:Preferences.

The operator of Special:Nuke will be prompted to access the agreement, if they have not already.

One part of this task is not yet done (seeing usernames next to pages) but the rest can start in QA.

Change #1081983 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/Nuke@master] SpecialNuke: Don't add actor names WHERE if no names supplied

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

Change #1081983 merged by jenkins-bot:

[mediawiki/extensions/Nuke@master] SpecialNuke: Don't add actor names WHERE if no names supplied

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

Testing on Test Wiki:

I created a page to be deleted, giving me a temporary account and assigning the page creation to it.

✅ I went to Special:Nuke and entered my IP address, and got a permission error, because I have yet to check the preference in my preferences.
✅ I entered the temporary account name, and was presented with the list of created pages as expected - no permission error.
✅ I enabled the preference, and now searching my IP address displays the created article.

❌ Despite queuing the page for deletion, the page was not actually deleted.

Screenshot 2024-10-25 at 14.30.37.png (366×930 px, 34 KB)

✅ I created another page from a new temporary account (same IP address) and now both pages are correctly listed.

❌ Again, though, no page deletion took place. Putting in a temporary account username and clicking Delete deleted one of the pages almost immediately as expected, but deletion seems not to work when an IP address is entered.

❓ Searching an IP address with no recent page creations displays a note linking to Special:Contributions for the IP address. This doesn't really make sense in the temporary account world, as far as I understand it. Should we de-link this if you searched for an IP address? I suppose it is still relevant while Nuke might be picking up IP created articles (i.e. while temp accounts is newly-deployed)

Screenshot 2024-10-25 at 14.28.08.png (242×728 px, 51 KB)

❌ Despite queuing the page for deletion, the page was not actually deleted.

Screenshot 2024-10-25 at 14.30.37.png (366×930 px, 34 KB)

❌ Again, though, no page deletion took place. Putting in a temporary account username and clicking Delete deleted one of the pages almost immediately as expected, but deletion seems not to work when an IP address is entered.

I might have been being impatient here - I just tested it again and it worked correctly. Maybe I wasn't waiting long enough in my previous tests.

Change #1081136 merged by jenkins-bot:

[mediawiki/extensions/Nuke@master] SpecialNuke: Display username next to pages for temp accounts

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

❌ Despite queuing the page for deletion, the page was not actually deleted.

Screenshot 2024-10-25 at 14.30.37.png (366×930 px, 34 KB)

❌ Again, though, no page deletion took place. Putting in a temporary account username and clicking Delete deleted one of the pages almost immediately as expected, but deletion seems not to work when an IP address is entered.

I might have been being impatient here - I just tested it again and it worked correctly. Maybe I wasn't waiting long enough in my previous tests.

The job queue has been moving slowly the last couple of days (T378385).

❌ Despite queuing the page for deletion, the page was not actually deleted.

Screenshot 2024-10-25 at 14.30.37.png (366×930 px, 34 KB)

❌ Again, though, no page deletion took place. Putting in a temporary account username and clicking Delete deleted one of the pages almost immediately as expected, but deletion seems not to work when an IP address is entered.

I might have been being impatient here - I just tested it again and it worked correctly. Maybe I wasn't waiting long enough in my previous tests.

The job queue has been moving slowly the last couple of days (T378385).

Ah, that could explain it, thanks.

@Quiddity This is the kind of thing I'd like users to know about, but it's wrapped up in the temporary account project, so wouldn't be relevant to most wikis yet. Does it make sense to add this to Tech News?

@Samwalton9-WMF could you validate this on enwiki after deployment on 10/31? It should have the aforementioned username display changes by then.

Scardenasmolinar moved this task from QA to Done on the Moderator-Tools-Team (Kanban) board.

We have tested this on test wiki and everything seems to be working as expected. Will move this to Done and resolve it.

@Samwalton9-WMF could you validate this on enwiki after deployment on 10/31? It should have the aforementioned username display changes by then.

I can check that it still works there for IPs and registered users, but temporary accounts are only on certain pilot wikis for now.

We checked with IPs and temporary accounts and they worked!