Page MenuHomePhabricator

wrapOldPasswords.php needs updating for AuthManager
Closed, ResolvedPublic

Description

wrapOldPasswords.php seems to need updating for AuthManager...

[22:40:31] <hop> so, i've inherited this old mediawiki instance. i've upgraded it to 1.29 and i would now like to update the password hashes
[22:41:06] <hop> `php maintenance/wrapOldPasswords.php --type pbkdf2-legacyA` laconically tells me "$wgAuth does not allow local passwords. Aborting."

If we look at the script...

		global $wgAuth;

		if ( !$wgAuth->allowSetLocalPassword() ) {
			$this->error( '$wgAuth does not allow local passwords. Aborting.', true );
		}

Using a default $wgAuth

> var_dump( $wgAuth )
object(MediaWiki\Auth\AuthManagerAuthPlugin)#113 (2) {
 ["domain":protected]=>
  NULL
  ["logger":protected]=>
  object(MediaWiki\Logger\LegacyLogger)#112 (1) {
   ["channel":protected]=>
    string(14) "authentication"
  }
}

If we then look at AuthManagerAuthPlugin

	public function allowSetLocalPassword() {
		// There should be a PrimaryAuthenticationProvider that does this, if necessary
		return false;
	}

Event Timeline

Change 391356 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] Remove $wgAuth usage from wrapOldPasswords.php

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

FWIW this was the only remaining usage of AuthPlugin in core, apart from compatibility wrappers.

Anomie assigned this task to Tgr.

Change 391356 merged by jenkins-bot:
[mediawiki/core@master] Remove $wgAuth usage from wrapOldPasswords.php

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

Change 391724 had a related patch set uploaded (by Reedy; owner: Gergő Tisza):
[mediawiki/core@REL1_27] Remove $wgAuth usage from wrapOldPasswords.php

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

Change 391725 had a related patch set uploaded (by Reedy; owner: Gergő Tisza):
[mediawiki/core@REL1_29] Remove $wgAuth usage from wrapOldPasswords.php

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

Change 391726 had a related patch set uploaded (by Reedy; owner: Gergő Tisza):
[mediawiki/core@REL1_30] Remove $wgAuth usage from wrapOldPasswords.php

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

Change 391724 merged by jenkins-bot:
[mediawiki/core@REL1_27] Remove $wgAuth usage from wrapOldPasswords.php

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

Change 391725 merged by jenkins-bot:
[mediawiki/core@REL1_29] Remove $wgAuth usage from wrapOldPasswords.php

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

Change 391726 merged by jenkins-bot:
[mediawiki/core@REL1_30] Remove $wgAuth usage from wrapOldPasswords.php

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