Page MenuHomePhabricator

Commons Vector.js loads WikiMiniAtlas over http when visiting https://commons
Closed, InvalidPublic


Not strictly in the scope of this tracker, I know, but putting this in as a TODO for myself.

On [[commons:MediaWiki:Vector.js]] (and possibly elsewhere), this:

var metaBase = '';
if ( mw.config.get( 'wgServer' ) == '' ) {
var metaBase = '';

needs to be changed to just

var metaBase = '//';

after we deploy HTTPS to meta.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:56 PM
bzimport added a project: HTTPS.
bzimport set Reference to bz30734.

There is a structure like that that is about as common, a little bit better:

var xBase = '';
if ( mw.config.get( 'wgServer' ).indexOf('https://') === 0 ) {
var xBase = '';

Except that this one is subject to the same bug, because wgServer doesn't contain http nor https. Until https is on all wikis, wikis should use protocol-relative where possible and keep these if-statements for wikis that don't yet.

Marking invalid as it's not a Wikimedia issue, but my previous post shows a work-around for wiks without https, and for those that do have https, the following can be used:

var xBase = '//';
mw.loader.load( xBase + '/w/index.php? ......' );

The latter has been applied to