Last modified: 2012-08-01 08:22:45 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 T33644, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31644 - GlobalUsage should use protocol-relative links
GlobalUsage should use protocol-relative links
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GlobalUsage (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
https://commons.wikimedia.org/w/index...
:
: 31640 32050 (view as bug list)
Depends on:
Blocks: 20342
  Show dependency treegraph
 
Reported: 2011-10-12 12:15 UTC by Helder
Modified: 2012-08-01 08:22 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2011-10-12 12:15:03 UTC
In the URL above, which is on secure server, the links points to HTTP but should point to HTTPS.
Comment 1 Brion Vibber 2011-10-13 16:27:38 UTC
*** Bug 31640 has been marked as a duplicate of this bug. ***
Comment 2 Derk-Jan Hartman 2011-10-22 18:56:27 UTC
Uses WikiMap:makeForeignLink() and WikiMap::getForeignURL, which uses the getURL()/getCanonical() variant for these links.

We could switch getForeignUrl to make use of getFullURL which would give back a protocol relative url.

Impact points for getForeignURL are:
/AbuseFilter/special/SpecialAbuseLog.php
/GlobalUsage/ApiQueryGlobalUsage.php

For makeForeignLink():
/AbuseFilter/special/SpecialAbuseLog.php
/GlobalUsage/ApiQueryGlobalUsage.php

Alternative is to add new static helper functions, to match the ones Roan added for the wiki references...
Comment 3 Derk-Jan Hartman 2011-10-22 19:13:42 UTC
Oh, and foreignUserLink():
./AbuseFilter/special/SpecialAbuseLog.php
./CentralAuth/specials/SpecialCentralAuth.php
./CentralAuth/specials/SpecialMergeAccount.php

While i'm making notes, it uses makeExternalLink atm. Perhaps making a proper interwiki link, with the extiw class, should be used here ?
Comment 4 db [inactive,noenotif] 2011-11-05 12:00:26 UTC
*** Bug 32050 has been marked as a duplicate of this bug. ***
Comment 5 billinghurst 2011-11-06 03:21:13 UTC
Is there a fix imminent?  Otherwise we may need to consider (temporarily) the return of the url fix that pre-exists at Commons.
Comment 6 Derk-Jan Hartman 2011-11-13 15:41:30 UTC
The problem with solving issues like these, is that few devs have this type of setup at home, so it's difficult to check if what you did is good.

Personally i think it should be fine to switch WikiMap:getForeingURL to use protocol relatives urls.
Then we add a WikiMap:getCanonicalUrl() and possibly use it for 
ApiQueryGlobalUsage and I think we should be just fine in that case, but i'm hesitant to commit something like that without confirmation by another developer.
Comment 7 Derk-Jan Hartman 2012-07-29 22:45:57 UTC
This seems so have been solved since.
Comment 9 Derk-Jan Hartman 2012-07-30 19:07:17 UTC
Ah I got fooled by commons'  script that ensures secure links.... https://commons.wikimedia.org/w/index.php?title=Special%3AGlobalUsage&limit=5&target=Example.jpg
Comment 10 Krinkle 2012-07-31 09:06:32 UTC
(rephrase bug to not be specific to the Special page - we may want to look at the API module as well)
Comment 12 Krinkle 2012-07-31 22:46:40 UTC
(In reply to comment #11)
> https://gerrit.wikimedia.org/r/17117
> https://gerrit.wikimedia.org/r/17118

Can you explain how using the current protocol fixes the bug? Or is the bug titled incorrect. It appears you did the exact opposite of the bug summary.

Sometimes the url has to be complete, in which canonical and/or current protocol makes sense. But when retrieving urls for usage in user interface, protocol-relative makes sense, that's what they're for.
Comment 13 Krinkle 2012-07-31 22:50:04 UTC
Okay so it seems the commit-msg was lacking details and the code wasn't very descriptive either.

Protocol-relative urls are now returned everywhere and the other commit enforces the current protocol in the one place it shouldn't be relative.

Can we markt this FIXED?
Comment 14 Derk-Jan Hartman 2012-08-01 08:22:45 UTC
Sorry Krinkle, I swapped the logic of cause and effect around, which made for a less than clear commit message if you didn't know what it was about indeed...

This can be marked fixed now.

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


Navigation
Links