Last modified: 2014-06-05 03:43:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63358, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61358 - Mobile view link unexpectedly goes to HTTPS
Mobile view link unexpectedly goes to HTTPS
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
PC Windows 7
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
aklapper-moreinfo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-14 02:37 UTC by grant
Modified: 2014-06-05 03:43 UTC (History)
12 users (show)

See Also:
Web browser: Firefox
Mobile Platform: Android 4.2.x
Assignee Huggle Beta Tester: ---


Attachments
Patch to change $args to $wgMFForceSecureLogin (960 bytes, patch)
2014-06-04 00:41 UTC, Morbus Iff
Details

Description grant 2014-02-14 02:37:42 UTC
clicking on the mobile line from a desktop pc
firefox 27
** 
Secure Connection Failed

An error occurred during a connection to www.idahothewhitewaterstate.com. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)
**
chrome
Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error code: ERR_SSL_PROTOCOL_ERROR

works fine on the android
Comment 1 grant 2014-02-14 02:38:58 UTC
link not "line"
Comment 2 grant 2014-02-14 05:05:19 UTC
the problem is the link is: https: rather than: http.
Comment 3 Max Semenik 2014-02-14 09:24:01 UTC
What is your MobileFrontend - related configuration?
Comment 4 Andre Klapper 2014-02-14 14:07:31 UTC
Hi grant,
unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please read https://www.mediawiki.org/wiki/How_to_report_a_bug and add a more useful description to this report.
What exactly is a "mobile link on a desktop pc"? 

How is this related to Wikimedia / Wikipedia?
Comment 5 grant 2014-02-14 15:02:22 UTC
This isn't  related in anyway to wikimedia or wikipedia. It is related to MediaWiki. MobileFrontend is a mediawiki extension and the bug reporting link on the extension page -- 
http://www.mediawiki.org/wiki/Extension:MobileFrontend
 directs to here, to bugzilla. If I am in the wrong place, perhaps that link should be removed. 

Let me know if I should continue.
Comment 6 Andre Klapper 2014-02-14 15:23:42 UTC
Please provide steps to reproduce the problem, so another person could follow your steps and would end up woith the same result.
Comment 7 Max Semenik 2014-02-14 16:29:30 UTC
Andre, the report is clear enough for me the MF developer.

grant, please tell me your configuration.
Comment 8 Bingle 2014-02-14 17:54:36 UTC
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1705
Comment 9 grant 2014-02-14 20:11:51 UTC
$wgServer = "http://wiki.kayakidaho.com";

# MobileFrontend
require_once __DIR__ . "/extensions/MobileFrontend/MobileFrontend.php";
$wgMFAutodetectMobileView = true;

pretty basic. I placed a couple mobile divs on the home page and a template. 

I tried a couple .htaccess rewrites without success. 
I have to qualify my comment: "works fine on android." 
The template works fine. It will switch back to desktop with the link at the footer. It will not switch back to mobile.
Comment 10 Arthur Richards 2014-02-14 20:51:57 UTC
Grant, it might be useful to see your whole LocalSettings.php file (with sensitive info like passwords, etc redacted). At the very least - do you have $wgSecureLogin set?
Comment 11 grant 2014-02-14 22:10:28 UTC
if it's a mess excuse me. 

***

if ( !defined( 'MEDIAWIKI' ) ) {
	exit;
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) );

#$wgCanonicalServer = 'http://wiki.x.com';
#require_once( "includes/DefaultSettings.php" );


$wgSitename      = "Idx ww";
$wgMetaNamespace = "Idx_ww";

$wgServer = "http://wiki.x.com";

$wgScriptPath 	 = "";            # not edited. that is how it appears  tuf to figure paths for subdomain. 
$wgScript           = "$wgScriptPath/index.php";
$wgRedirectScript   = "$wgScriptPath/redirect.php";
$wgArticlePath      = "$wgScript?title=$1";
$wgStylePath        = "$IP/skins";
$wgStyleDirectory   = "skins";
$wgLogo             = "images/bookthumb.jpg";
$wgSecureLogin      = false;
$wgEnableEmail 	    = true;
$wgEnableUserEmail = false;

$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = false;

## Shared memory settings
$wgEnableParserCache = false;
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgTmpDirectory   = true;
$wgEnableUploads = true;
 $wgFileExtensions = array('png','gif','jpg','jpeg','xls','pdf','tiff','bmp','kml');
$wgUseImageResize = true;
$wgUseImageMagick = true;
##$wgImageMagickConvertCommand = "/usr/bin/convert";
##image majik thumb fix sept 10
$wgCustomConvertCommand = "/usr/bin/convert -resize %wx%h %s %d";
$wgImageMagickTempDir = "$IP/x/tmp";
$wgTmpDirectory = "$IP/x/tmp";
$wgLanguageCode = "en";
$wgProxyKey = "xx";
$wgDefaultSkin = 'monobook';
$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = "Copyright";

$wgDiff3 = "/usr/bin/diff3";


$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
$wgWhitelistRead =  array( "Main Page", "Special:Userlogin", "Help:Contents", "Idaho Whitewater:Privacy policy", "Idaho_Whitewater:About", "Special:Contact", "Payette,_Middle_Fork,_Silver_Creek");
$wgGroupPermissions['*'    ]['edit']            = false;
$wgGroupPermissions['*'    ]['read']            = false;
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['sysop']['createaccount']   = true;

# extensions start here
enableSemantics( 'wiki.x.com');
# Namespace config SMW
$smwgNamespace = 'http://wiki.x.com';
# Semantic Maps
require_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );  
# installer
require_once "$IP/extensions/ExtensionInstaller/ExtensionInstaller.php";              
 // Category Tree
#$wgUseAjax = true;
require_once( "$IP/extensions/CategoryTree/CategoryTree.php" );
#forms
include_once( "$IP/extensions/SemanticForms/SemanticForms.php" );
$wgAllowExternalImages = true;

# mobile frontend
#require_once "$IP/extensions/MobileFrontend/MobileFrontend.php";
require_once __DIR__ . "/extensions/MobileFrontend/MobileFrontend.php";
$wgMFAutodetectMobileView = true;

# ajax poll
require_once __DIR__ . "/extensions/AJAXPoll/AJAXPoll.php";
$wgGroupPermissions['user']['ajaxpoll-view-results'] = true;
#contactpage
require_once( "$IP/extensions/ContactPage/ContactPage.php" );
$wgContactUser = 'me';
$wgContactSender = $wgPasswordSender;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;

#confirm edit
require_once "$IP/extensions/ConfirmEdit/ReCaptcha.php";
$wgCaptchaClass = 'ReCaptcha';
$wgReCaptchaPublicKey = 'x';
$wgReCaptchaPrivateKey = 'x';
#turn on captcha on the contact
$wgCaptchaTriggers['contactpage'] = true;
Comment 12 Arthur Richards 2014-02-27 22:26:27 UTC
Grant, I don't see anything that suggests the problem is Mediawiki or MobileFrontend related and I can't replicate your problem. The error your described in your original post suggests to me that you may be dealing with a server configuration issue, though I really can't be sure.

Is the site in question publicly visible? It may be easier for us to have a better sense of what is happening if we can see the issue in the wild.
Comment 13 grant 2014-02-27 22:40:05 UTC
I'm in the middle of a server change. Give me a day or two. Since is is a subdoman of a different site, I wonder if the htaccess of the other site is passing along some values. I will get back to you once I'm up and running.
Comment 14 Jon 2014-02-28 00:19:27 UTC
Thanks for the update Grant.
Comment 15 Andre Klapper 2014-05-12 21:04:48 UTC
(In reply to grant from comment #13)
> I'm in the middle of a server change. Give me a day or two.

Grant: Any news?
Comment 16 Morbus Iff 2014-06-04 00:00:21 UTC
I'm seeing this too. Still debugging. Public URL: http://www.disobey.com/wiki/Main_Page
Comment 17 Morbus Iff 2014-06-04 00:30:36 UTC
Fact dump:

 * Old wiki, updated a number of times.
 * No core hacks or patches.
 * Never configured for https:.
 * Brand new install of MobileFrontend.
 * Vanilla enabled - no additional config past $wgMFAutodetectMobileView.
 * Running today-pulled REL1_22 of both core and MobileFrontend.
 * $wgSecureLogin is not set.

The cause is in MobileContext::getMobileUrl( $url, $forceHttps = false ), namely that second argument. In the code, if that evaluates to TRUE, then the scheme is set to https - the expectation for that argument is a boolean. But, if you look in onSkinTemplateOutputPageBeforeExec(), you'll see that $args, an array, is being passed to it. In my case, $wgMobileUrlTemplate wasn't configured, so $args will always be an array filled with the mobileaction => toggle_view_mobile.
Comment 18 Morbus Iff 2014-06-04 00:41:25 UTC
Created attachment 15563 [details]
Patch to change $args to $wgMFForceSecureLogin

Patch attached. I'm not a MW developer, so I've likely screwed up the proper workflow somewhere, but this is what's now running on disobey.com/wiki/, and is consistent with other uses of getMobileUrl() with the second argument.
Comment 19 Florian 2014-06-04 05:43:52 UTC
@Morbus: Can you use Gerrit patch uploader instead? :)
https://tools.wmflabs.org/gerrit-patch-uploader/

For this tool you only need a free MediaWiki account :)
Comment 20 Florian 2014-06-04 06:04:33 UTC
@Morbus: Sorry, but: https://gerrit.wikimedia.org/r/#/c/91123/
:) In actual version of MobileFrontend getMobileUrl is called with only one argument, so all ok, no need for a patch? Can you try to update MobileFrontend and test?
Comment 21 Morbus Iff 2014-06-04 11:03:06 UTC
@Florian: Confused. I grabed REL1_22 from git, per http://www.mediawiki.org/wiki/Extension:MobileFrontend - I pull all my extensions and MW core from git vs. using the packaged downloads. Even so, the commit isn't in the snapshot download either. It doesn't look like this patch has been applied to REL1_22 at all - should it have been?

https://git.wikimedia.org/log/mediawiki%2Fextensions%2FMobileFrontend.git/refs%2Fheads%2FREL1_22
Comment 22 Morbus Iff 2014-06-04 11:05:24 UTC
Incidentally, I can't use master, as there's a version checker in it which states it requires MW 1.23.
Comment 23 Gerrit Notification Bot 2014-06-04 11:17:38 UTC
Change 137291 had a related patch set uploaded by Florianschmidtwelzow:
Fix incorrect value being passed in second argument of MobileContext::getMobileUrl()

https://gerrit.wikimedia.org/r/137291
Comment 24 Florian 2014-06-04 11:31:48 UTC
Yeah, you are right, the patch isn't backported to REL1_22.
Comment 25 Gerrit Notification Bot 2014-06-04 22:03:08 UTC
Change 137291 merged by MaxSem:
Fix incorrect value being passed in second argument of MobileContext::getMobileUrl()

https://gerrit.wikimedia.org/r/137291

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links