Page MenuHomePhabricator

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

Description

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 (<//otrs-wiki.wikimedia.org/w/index.php>) named "Isarra"...

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


Version: unspecified
Severity: normal

Details

Reference
bz42036

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).
Isarra created this task.Nov 12 2012, 4:20 AM

Line 875 of SpecialUserlogin inside SpecialUserlogin::mailPasswordInternal.

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;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.

IAlex added a comment.Nov 12 2012, 6:40 AM

Change merged.

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptJan 28 2016, 6:11 PM