Last modified: 2012-10-20 09:25: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 T43237, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41237 - canonicalurl magic word always defaults to *showing* insecure
canonicalurl magic word always defaults to *showing* insecure
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-20 07:54 UTC by Brian McNeil
Modified: 2012-10-20 09:25 UTC (History)
2 users (show)

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


Attachments
Screenshot showing access via https, with canonicalurl being parsed and displayed as-if an http llink (104.42 KB, image/png)
2012-10-20 08:07 UTC, Brian McNeil
Details

Description Brian McNeil 2012-10-20 07:54:45 UTC
I've tested this in the Wikinews sandbox: https://en.wikinews.org/wiki/Wikinews:Sandbox

If I put {{canonicalurl:Main Page}}, the displayed link states "http:// ..." But, the actual provided link is https://

The problem came to light when trying to implement code to conditionally offer a link to the secure version of the site.

I note there is bug 38875, asking for {{CANONICALSERVER}}; I'm none-to-fussed how I can test for a page having been loaded over https://, a {{PROTOCOL}} magic word would be nice, but labelling a link as http:// when it is https:// is just plain wrong.
Comment 1 Brian McNeil 2012-10-20 08:07:38 UTC
Created attachment 11209 [details]
Screenshot showing access via https, with canonicalurl being parsed and displayed as-if an http llink

This is likely a bug with far-wider impact than simply the canonicalurl magic word incorrectly being displayed with the wrong protocol.

However, the problem I was attempting to solve which highlighted this is obtaining the actual protocol a user is accessing via.
Comment 2 Liangent 2012-10-20 09:01:18 UTC
This is by design. canonicalurl returns something canonical, and http:// is configured as the canonical one.
Comment 3 Brian McNeil 2012-10-20 09:20:26 UTC
(In reply to comment #2)
> This is by design. canonicalurl returns something canonical, and http:// is
> configured as the canonical one.

Okay, then how does one query which protocol a user is accessing via?
Comment 4 Liangent 2012-10-20 09:25:57 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > This is by design. canonicalurl returns something canonical, and http:// is
> > configured as the canonical one.
> 
> Okay, then how does one query which protocol a user is accessing via?

There isn't a way to do it in page body AFAIK. Otherwise it splits cache. See bug 31531.

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


Navigation
Links