Page MenuHomePhabricator

PluggableAuthService::moveLoginButton doesn't respect AuthChangeFormFieldsHook defined weights
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  • Define no weight in config.
  • Use AuthChangeFormFieldsHook to assign a weight.
	public function onAuthChangeFormFields( $requests, $fieldInfo, &$formDescriptor, $action ) {
		$formDescriptor['pluggableauthlogin0']['weight'] = 999;
	}

What happens?:

weight is ignored.

PluggableAuthService::moveLoginButton applies the configuration-defined weight if present, but otherwise defaults to 101.

image.png (391×351 px, 20 KB)

What should have happened instead?:

weight applied.

Use the config-defined weight if available.
Otherwise fall back to the weight set in $formDescriptor by AuthChangeFormFieldsHook,
If neither is set, default to 101.

image.png (396×357 px, 20 KB)

Software version:
master

Event Timeline

Change #1128735 had a related patch set uploaded (by Hslater; author: Hslater):

[mediawiki/extensions/PluggableAuth@master] Fix weight assignment in moveLoginButton

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

Change #1128735 merged by jenkins-bot:

[mediawiki/extensions/PluggableAuth@master] Fix weight assignment in moveLoginButton

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

cicalese assigned this task to Hslater.

Change #1139162 had a related patch set uploaded (by Cicalese; author: Hslater):

[mediawiki/extensions/PluggableAuth@REL1_43] Fix weight assignment in moveLoginButton

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

Change #1139162 merged by jenkins-bot:

[mediawiki/extensions/PluggableAuth@REL1_43] Fix weight assignment in moveLoginButton

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