Page MenuHomePhabricator

Special:MultiLock 'Mark entries on Recent changes as bot entries' is no longer working
Closed, ResolvedPublic

Description

After this patch and follow ups, checking 'Mark entries on Recent changes as bot entries' on Special:MultiLock is no longer setting the locks as done by a bot, causing Special:RecentChanges to be flooded, and StewardBot to quit on IRC.

Event Timeline

Sorry, wasn't aware of this feature. The problem is ManualLogEntry::publish does the insert in a deferred callback. So the hack in

SpecialMultiLock::setStatus
$guard = null;
if ( $this->getRequest()->getCheck( 'markasbot' ) ) {
	if ( !$this->getContext()->getAuthority()->isAllowed( 'bot' ) ) {
		$guard = MediaWikiServices::getInstance()->getPermissionManager()
			->addTemporaryUserRights( $this->getUser(), 'bot' );
	}
	$this->getRequest()->setVal( 'bot', true );
}
/*
lots of code
*/
// revoke temporary bot right
ScopedCallback::consume( $guard );

doesn't work anymore because the revocation is done before the deferred callback is processed.
Anyways, I can see a way around.

Change 740620 had a related patch set uploaded (by Matěj Suchánek; author: Matěj Suchánek):

[mediawiki/extensions/CentralAuth@master] Fix \"Mark entries as bot entries\" feature

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

matej_suchanek changed the task status from Open to In Progress.Nov 24 2021, 1:07 PM
matej_suchanek triaged this task as High priority.

Change 740620 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Fix \"Mark entries as bot entries\" feature

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

Change 742256 had a related patch set uploaded (by Urbanecm; author: Matěj Suchánek):

[mediawiki/extensions/CentralAuth@wmf/1.38.0-wmf.9] Fix \"Mark entries as bot entries\" feature

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

Change 742256 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@wmf/1.38.0-wmf.9] Fix \"Mark entries as bot entries\" feature

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

Mentioned in SAL (#wikimedia-operations) [2021-11-29T10:57:23Z] <urbanecm@deploy1002> Synchronized php-1.38.0-wmf.9/extensions/CentralAuth/includes/Special/SpecialMultiLock.php: rECAU5fc6aaa73202: Fix "Mark entries as bot entries" feature (1/2; T296297) (duration: 00m 56s)

Mentioned in SAL (#wikimedia-operations) [2021-11-29T10:58:18Z] <urbanecm@deploy1002> Synchronized php-1.38.0-wmf.9/extensions/CentralAuth/includes/CentralAuthUser.php: rECAU5fc6aaa73202: Fix "Mark entries as bot entries" feature(2/2; T296297) (duration: 00m 55s)

Feel free to close this as resolved if you have the rights and it works for you.

It's working again, thanks a ton!