Page MenuHomePhabricator

createAndPromote.php adds an empty log into the rights log
Closed, ResolvedPublic

Description

While running createAndPromote.php at my local wiki today, I noticed it adds an empty log entry to the user rights log:

I have no name!@25400f159b78:/var/www/html/w$ php maintenance/createAndPromote.php "Test user 21" "Heslo1234."

*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
      Running scripts directly has been deprecated in MediaWiki 1.40.
      It may not work for some (or any) scripts in the future.
*******************************************************************************

done.
I have no name!@25400f159b78:/var/www/html/w$

At http://localhost:8080/wiki/Special:Log/rights, I can see: 16:47, 30 June 2023 Maintenance script talk contribs block changed group membership for Test user 21 from (none) to (none).

This is not expected; the user rights entry should only be added if createAndPromote.php was actually instructed to do any promotions (it is confusingly named; the script can be used for user creation, user promotion, or both).

Details

Event Timeline

Change 934591 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/core@master] createAndPromote: Fix logging of user right changes

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

Change 934591 merged by jenkins-bot:

[mediawiki/core@master] createAndPromote: Fix logging of user right changes

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