Page MenuHomePhabricator

[S] Infinite redirect on Special:Contribute (
Closed, ResolvedPublic1 Estimated Story Points


While logged-in with KHarlan_(WMF) I get an infinite redirect when attempt to visit Special:Contribute in Minerva (m subdomain) or on desktop (Vector 2022).

image.png (1×2 px, 399 KB)

Seemingly this is the problematic code in SpecialContribute.php:

$target = $par ?? $request->getVal( 'target', '' );

$titleLocalUrl = static::getTitleFor( 'Contribute', $this->getUser()->getName() )->getLocalUrl();
if ( $target !== $this->getUser()->getName() ) {
   $this->getOutput()->redirect( $titleLocalUrl );


Go to

QA Results - Prod


Event Timeline

The underscore/space in user name didn't get normalized, but why it needs to be redirected to the subpage with user name?

Change 842399 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] SpecialContribute: Avoid unnecessary redirects and optimise showing checks

Change 842399 merged by jenkins-bot:

[mediawiki/core@master] SpecialContribute: Avoid unnecessary redirects and optimise showing logics

LGoto set the point value for this task to 1.Oct 18 2022, 5:00 PM
LGoto renamed this task from Infinite redirect on Special:Contribute ( to [S] Infinite redirect on Special:Contribute ( 18 2022, 5:06 PM
LGoto moved this task from Upcoming to QA on the Web-Team-Backlog (Kanbanana-2022-23-Q2) board.

Note: This patch didn't catch the train of 1.40/wmf.6, so it is not ready to QA in prod.

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: mediawiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Go to Confirm there are no infinite redirects. Repeat for Vector 2022.
Note I only tested this in Production. No redirects were present in the network tab of devtools.

Screen Recording 2022-10-25 at 3.21.53 (548×1 px, 324 KB)

Looks good, resolving!