Page MenuHomePhabricator

Update username in AbuseFilter interface when user is renamed using Renameuser
Open, Stalled, MediumPublic

Details

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:22 PM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz25377.
bzimport added a subscriber: Unknown Object (MLST).

The same problem happens with the CodeReview extension. Is this something that could be fixed in both extensions at once?

thogol wrote:

I want to add that a search for the old username does not give any results with the log, despite the fact that the old username does still appear in the log (you get there only by searching for the *new* username which does in fact *not* appear in the log). It's very confusing. :)

Best regards.

This is because user renaming is not a MediaWiki core feature. We use Extension:Renameuser.

Extension:Renameuser provides several hooks for other extensions to register their tables/columns that need updating in case of a rename.

So it is correct that this is a request for the AbuseFilter extension to use those hooks.

Patch was -1'ed and abandoned - removing keyword.

Change 145156 had a related patch set uploaded by Legoktm:
Use user id to get a logged in user's name

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

I agree that the user text needs to be updated from the old username to the new username. Otherwise, viewing the abuse filter log for the new username would just say "No results" or new entries after the rename instead of the entries prior to the rename. We should also make UserCache work globally. Once that happens, please try to merge Change 145156.

Let's wait for T167246. AFAICS, what makes this not trivial are global filters.

Huji changed the task status from Open to Stalled.Feb 22 2018, 3:58 PM

Excellent point, marking this as stalled for now.

MarcoAurelio added a subscriber: revi.

No patch for review that I can find.

Framawiki renamed this task from AbuseFilter should be compatible with Renameuser to Update username in AbuseFilter log entry when user is renamed using Renameuser.Jun 8 2018, 5:19 PM
matej_suchanek renamed this task from Update username in AbuseFilter log entry when user is renamed using Renameuser to Update username in AbuseFilter interface when user is renamed using Renameuser.Jul 9 2018, 8:26 AM

While it might not completely fix the problem for global filters, would a hook "onRenameUserSQL" in the style of this patch to CheckUser solve most of this problem?

Given that T167246 is not progressing really, I'm okay with implementing a temporary partial solution as described by @ST47. @Daimona and @matej_suchanek what do you think?

The task to wait for was T188180. But this can work without that for abuse_filter and abuse_filter_history. abuse_filter_log is complicated because of global filters and other issues.

Change 631182 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/AbuseFilter@master] Integrate with Renameuser

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

Change 631182 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Integrate with Renameuser

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

Just came to report this, but it seems to have been done already
Can existing entries be fixed via script?

Just came to report this, but it seems to have been done already
Can existing entries be fixed via script?

I'd say no. The existing entries will be fixed by the actor migration, which is going to require a maintenance script anyway.

The remaining part is blocked on several limitations that cannot be reasonably resolved within the project.