From cbbac8cfe09ab30a2837ba300e83199561089ca9 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 16 Oct 2013 10:29:39 -0400 Subject: [PATCH] Include miscellaneous query parameters in $wgSecureLogin redirect MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The redirect from http to https should include any extra query parameters, such as the ones for "campaigns". But we still want to override returnto and returntoquery (in case they were changed in ::load(), e.g. lines 139–140), and we omit any 'title' parameter that may have been passed. Bug: 55761 Change-Id: Icc8b4132e8682d782b0c049631328b94745eb355 --- includes/specials/SpecialUserlogin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 2b60ca25b2..90c4c35841 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -173,7 +173,8 @@ class LoginForm extends SpecialPage { $query = array( 'returnto' => $this->mReturnTo, 'returntoquery' => $this->mReturnToQuery, - ); + 'title' => null, + ) + $this->mRequest->getQueryValues(); $url = $title->getFullURL( $query, false, PROTO_HTTPS ); if ( $wgSecureLogin && wfCanIPUseHTTPS( $this->getRequest()->getIP() ) ) { $url = wfAppendQuery( $url, 'fromhttp=1' ); -- 2.20.1