Page MenuHomePhabricator

Update block log when renaming an account
Closed, ResolvedPublic

Description

Author: koneko

Description:
If I rename an user that happen to be currently blocked, the blocklist doesn't
follow : there's still the block with the old name (a fanthom block, since it
does not correspond to an existing account anymore).

For exemple
*aaaaa is blocked
*aaaaa is renamed to bbbbb
->"aaaaa" still appears unchanged in the block list

You ask, why the hell renaming a blocked account ? well because, it's because
they're containing insults (often against sysop, religion, ...)

Darkoneko


Version: unspecified
Severity: enhancement

Details

Reference
bz7011

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:21 PM
bzimport set Reference to bz7011.
bzimport added a subscriber: Unknown Object (MLST).

titoxd.wikimedia wrote:

This requires the following SQL statement:

UPDATE $DBprefix_logging SET log_title = '(new username)' WHERE log_type =
'block' AND log_title='(old username)'

I'll be committing a patch shortly...

titoxd.wikimedia wrote:

Logging table fix

I'm not sure how expensive this is, but here's my first patch. Enjoy! ;)

attachment renameuser.diff ignored as obsolete

titoxd.wikimedia wrote:

Stab 2

Using Title::getDBkey(), as it should be

attachment renameuser.diff ignored as obsolete

titoxd.wikimedia wrote:

Whitespace fix

Remove artifact caused by IDE

Attached:

Would make log inaccurate. WONTFIX.

titoxd.wikimedia wrote:

Reopening the bug per Brion on #wikimedia-tech

There's some general issues with logs and deleted/moved stuff. One way to fix
those problems is by modifying the logging table to include a foreign key with
the page id or the user id of a page or user, respectively. Then, a block can be
looked up via a log_user_id column, instead of the log_title column, which would
give out all the blocks on an account regardless of renames, and would not
require tampering with logs.

Related to this is keeping the revision_id of a deleted page, keeping the logs
of protected pages with the page, and other assorted Bag O'Stuff. More
suggestions include changing Special:Log to include more text boxes, so that
typing "User:Titoxd" in the page field does not become necessary anymore. That
could potentially be transparently to the user.

titoxd.wikimedia wrote:

For future reference: related to this issue are bug 8296 and bug 2919.

chickbowen wrote:

The same problem has come up with the user rights log. For sysops who change
usernames, the user rights log stays on the old username.

caroline.ford.work wrote:

This is causing us problems. (see
http://en.wikipedia.org/wiki/Wikipedia_talk:Changing_username for discussion).

We cannot tell from the logs whether a user has previously been renamed or not -
and their block log stays with the old name. This makes it hard for admins to
know how long to block someone for as if you are renamed you lose your history.
We also can't pick up renaming addicts.

  • Bug 12926 has been marked as a duplicate of this bug. ***