From 1bc68932af24191beb2729f6fa2b6d46977da3dd Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 5 Sep 2011 19:29:20 +0000 Subject: [PATCH] Don't use $wgServer (potentially protocol-relative!) in the password reset e-mail. The documentation calls for $4 to be "the base URL of the wiki" and the code was using $wgServer . $wgScript which produces the URL to index.php , so I decided to use the URL to the Main Page instead. This avoids using globals and doesn't suffer from mixed URL structure issues on secure.wm.o --- includes/specials/SpecialPasswordReset.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 476ab05696..5cdb1c04d1 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -152,7 +152,7 @@ class SpecialPasswordReset extends FormSpecialPage { } } - global $wgServer, $wgScript, $wgNewPasswordExpiry; + global $wgNewPasswordExpiry; // All the users will have the same email address if ( $firstUser->getEmail() == '' ) { @@ -190,7 +190,7 @@ class SpecialPasswordReset extends FormSpecialPage { $username, $passwordBlock, count( $passwords ), - $wgServer . $wgScript, + Title::newMainPage()->getCanonicalUrl(), round( $wgNewPasswordExpiry / 86400 ) ); -- 2.20.1