Page MenuHomePhabricator

Account creation by email uses a protocol-relative URL for the wiki
Closed, ResolvedPublic


Unlike in other MediaWiki emails, creating an account by email and sending the new user a password that way results in the user also being sent only a protocol-relative url:

Someone created an account for your e-mail address on OTRS Wiki (<//>) named "Isarra"...

There should be a http: in it like the urls in other emails have.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:59 AM
bzimport set Reference to bz42036.
bzimport added a subscriber: Unknown Object (MLST).

Line 875 of SpecialUserlogin inside SpecialUserlogin::mailPasswordInternal.;a=blob;f=includes/specials/SpecialUserlogin.php;hb=HEAD#l875

Looks like $wgServer and $wgScript are used directly instead of using helper methods and using wfExpandUrl along with PROTO_CANONICAL.

Or we could just use $wgCanonicalServer.

Gerrit change 33048

No need to continue using global cruft when we have better interfaces for such things. Anything manually concatenating a $wg*Server with a path is way out of date.

I look forward to your changeset that cleans up the use of $wg*Server, $wgScript*, and so on throughout the whole codebase.