Page MenuHomePhabricator

Have user links follow the same behavior as in SpecialCheckUser
Closed, DeclinedPublicMay 12 2020

Description

This is a follow up patch on top of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/594615

See: https://gerrit.wikimedia.org/g/mediawiki/extensions/CheckUser/+/53ffb05ad1e4e7b7a5fa419e2229f686ce662c36/includes/specials/SpecialCheckUser.php#1789 for details on how it should work.
There is already a placeholder for this at TimelineRowFormatter::getUserLinks

Details

Due Date
May 12 2020, 7:00 AM

Event Timeline

dmaza created this task.May 6 2020, 3:52 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 6 2020, 3:52 PM
Niharika triaged this task as Medium priority.May 7 2020, 3:33 PM
Niharika set Due Date to May 12 2020, 7:00 AM.
Niharika changed the subtype of this task from "Task" to "Deadline".
dmaza claimed this task.May 7 2020, 8:47 PM
dmaza moved this task from Ready to In Progress on the Anti-Harassment (The Letter Song) board.

Change 595807 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/CheckUser@master] Add proper display of user links

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

I think the user links are better the way they are already implemented in Special:Investigate, without doing this task. If I've understood correctly, this task caters for two cases: the log entry for a user attempting to create an account that was prevented by AbuseFilter, and entries for users with no contributions.

AbuserFilter prevents account creation

Without doing this task, if a user tries to create an account but is prevented by AbuseFilter, the Timeline row looks like this in Special:Investigate:

That allows the check user to see the talk page and contributions for the IP address that the account was created from (and potentially block it), which might be useful. We can still see the name of the account that the user attempted to make ("Forbidden2" in this case).

If we do this task, the Timeline row will look like this in Special:Investigate:

The red links lead to non-existent pages, which I don't think are useful here since the user doesn't exist, so we never expect those pages to exist. The block link leads to Special:Block for this nonexistent user, which has an error message (There is no user by the name "Forbidden2". Check your spelling).

User has no contributions

If I've understood correctly from the code comments, the other concern was that a user who does exist but has no contributions should have a red-linked contributions page, and that already happens without doing this task. Here's a Timeline row in Special:Investigate for a user who has no contributions (without doing this task):

@Niharika @Prtksxna What do you think?

dmaza added a comment.EditedMay 13 2020, 3:06 PM

@Tchanders I'm a bit confused. Are you saying that the implementation before the patch on this task works better? if that's the case I do not disagree. This patch only exists to match current functionality of Special:CheckUser

To have then side by side, left is the the old implementation in the timeline, right is the specialcheckuser current implementation

I think it's fine to improve on Special:CheckUser, if we all think it's an improvement. We've already deviated from Special:CheckUser in a couple of places, e.g.:

That allows the check user to see the talk page and contributions for the IP address that the account was created from (and potentially block it), which might be useful. We can still see the name of the account that the user attempted to make ("Forbidden2" in this case).

The red links lead to non-existent pages, which I don't think are useful here since the user doesn't exist, so we never expect those pages to exist. The block link leads to Special:Block for this nonexistent user, which has an error message (There is no user by the name "Forbidden2". Check your spelling).

In this case was the AbuseFilter triggered because:

  1. a logged in user Forbidden2 tried to create a new account (its so weird that logged in users can create accounts)? Or…
  2. a new user from a specific IP tried to create a new account Forbidden2 which the AbuseFilter disallowed?
  1. a new user from a specific IP tried to create a new account Forbidden2 which the AbuseFilter disallowed?

This one is what happened.

  1. a new user from a specific IP tried to create a new account Forbidden2 which the AbuseFilter disallowed?

This one is what happened.

Thanks!


That allows the check user to see the talk page and contributions for the IP address that the account was created from (and potentially block it), which might be useful. We can still see the name of the account that the user attempted to make ("Forbidden2" in this case).

This makes sense.

The red links lead to non-existent pages, which I don't think are useful here since the user doesn't exist, so we never expect those pages to exist. The block link leads to Special:Block for this nonexistent user, which has an error message (There is no user by the name "Forbidden2". Check your spelling).

This doesn't as much.

If I've understood correctly from the code comments, the other concern was that a user who does exist but has no contributions should have a red-linked contributions page, and that already happens without doing this task. Here's a Timeline row in Special:Investigate for a user who has no contributions (without doing this task)

This behaviour makes sense too. Are you aware of any precedent to not show the contribs link at all when there are no contributions?

This behaviour makes sense too. Are you aware of any precedent to not show the contribs link at all when there are no contributions?

I'm not aware of anywhere that does this. The links are handled by Linker::userToolLinks, which we're calling with $redContribsWhenNoEdits = true.

If we did want to remove the contribs link, we should be able to do so using css, using the classes mw-usertoollinks-contribs and new. I'm not sure whether we should do that if it's not done anywhere else... Absence of a link might be interpreted as a bug by users who are used to seeing a red link?

dmaza added a comment.May 14 2020, 3:48 PM

This behaviour makes sense too. Are you aware of any precedent to not show the contribs link at all when there are no contributions?

I'm not aware of anywhere that does this. The links are handled by Linker::userToolLinks, which we're calling with $redContribsWhenNoEdits = true.

If we did want to remove the contribs link, we should be able to do so using css, using the classes mw-usertoollinks-contribs and new. I'm not sure whether we should do that if it's not done anywhere else... Absence of a link might be interpreted as a bug by users who are used to seeing a red link?

FWIW, contribs link is not shown if the userId passed into Linker::userToolLinks is 0. For ips, SpecialCheckUser passes -1 as a way to hack it and link to said ips contributions

dmaza added a comment.May 14 2020, 3:52 PM

@Prtksxna


The 2 and 3rd entries on may 13th is a user creation from an IP (unauthenticatd) and from a logged in user.

its so weird that logged in users can create accounts

A lot of people will create legitimate sock puppets to protect their privacy. Admins typically prefer you to do this while logged in because it will tie the accounts together (and I believe can be looked up somewhere). Obviously this isn't public.

JJMC89 added a subscriber: JJMC89.May 14 2020, 4:20 PM

its so weird that logged in users can create accounts

A lot of people will create legitimate sock puppets to protect their privacy. Admins typically prefer you to do this while logged in because it will tie the accounts together (and I believe can be looked up somewhere). Obviously this isn't public.

The logs are public.

The English Wikipedia has Wikipedia:Request an account where accounts are created by existing users when the requestor cannot do so themselves.

FWIW, contribs link is not shown if the userId passed into Linker::userToolLinks is 0. For ips, SpecialCheckUser passes -1 as a way to hack it and link to said ips contributions

@Prtksxna @dmaza If the user ID is 0 (i.e. the "user" was an IP address) then the "user" link will link to the contribs page, rather than the usertoollinks doing so. E.g.:

Here, "::1" links to the contribs page for that IP.

The logs are public.

The English Wikipedia has Wikipedia:Request an account where accounts are created by existing users when the requestor cannot do so themselves.

Welp! I learn something new everyday! Thanks @JJMC89!

@Prtksxna @dmaza If the user ID is 0 (i.e. the "user" was an IP address) then the "user" link will link to the contribs page, rather than the usertoollinks doing so. E.g.:

The user being an IP address in the usual case, right? When a reader comes to Wikipedia and creates an account they are essentially an IP address, right?

@Prtksxna Yes, normally when you create an account you wouldn't already be logged in, so you'd be an anonymous user from that IP address.

Incidentally, if you do try to create an account as a logged-in user, but it's disallowed by AbuseFilter, the row in the Timeline will link to that logged-in user's page and contributions etc.

To summarize, the way the Timeline is currently working:

  • If a logged-out user tries to create an account but it's disallowed by AbuseFilter, the Timeline will show links for the IP address contributions, IP address talk, and Special:Block pre-filled with the IP address
  • If a logged-in user tries to create an account but it's disallowed by AbuseFilter, the Timeline will show user links for the logged-in user's user page, talk page, contributions page and Special:Block pre-filled with that user

If we do this task and apply the patch, then if an account is created from an IP address, the Timeline will show links for:

  • The non-existent user page for the non-existent user, their non-existent talk page, the non-existent user contributions page, Special:Block in an error state

@Prtksxna @Niharika It sounds like we should decline this task?

Tchanders added a comment.EditedMay 18 2020, 10:14 AM

The above comment posted twice, so deleting the duplicate

Niharika closed this task as Declined.May 18 2020, 6:46 PM

@Prtksxna Yes, normally when you create an account you wouldn't already be logged in, so you'd be an anonymous user from that IP address.

Incidentally, if you do try to create an account as a logged-in user, but it's disallowed by AbuseFilter, the row in the Timeline will link to that logged-in user's page and contributions etc.

To summarize, the way the Timeline is currently working:

  • If a logged-out user tries to create an account but it's disallowed by AbuseFilter, the Timeline will show links for the IP address contributions, IP address talk, and Special:Block pre-filled with the IP address
  • If a logged-in user tries to create an account but it's disallowed by AbuseFilter, the Timeline will show user links for the logged-in user's user page, talk page, contributions page and Special:Block pre-filled with that user

If we do this task and apply the patch, then if an account is created from an IP address, the Timeline will show links for:

  • The non-existent user page for the non-existent user, their non-existent talk page, the non-existent user contributions page, Special:Block in an error state

@Prtksxna @Niharika It sounds like we should decline this task?

That makes sense to me, @Tchanders. Thanks for the summary. I'll decline the task.

Change 595807 abandoned by Dmaza:
Add proper display of user links

Reason:
Task was declined

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