Last modified: 2013-09-04 11:49:47 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 T36726, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34726 - Link "Upload a new version of this file" should be relative
Link "Upload a new version of this file" should be relative
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.17.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-26 11:03 UTC by Cat Mucius
Modified: 2013-09-04 11:49 UTC (History)
1 user (show)

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


Attachments

Description Cat Mucius 2012-02-26 11:03:16 UTC
The "Upload a new version of this file" link is generated in a non-relative way, apart of all other links on the same page. This causes several troubles:

Scenario: users access the Wiki through Apache reverse proxy, which translates HTTPS to HTTP. Users access external address https://wiki.domain.com, and the proxy forwards requests to http://wiki.internal.local.

Trouble 1: when users open a page with details of uploaded file (like index.php/File:Document.docx), the "Upload a new version of this file" link is generated with _internal_ hostname:
http://wiki.internal.local/index.php?title=Special:Upload&wpDestFile=Document.docx&wpForReUpload=1

Of course, users behind the proxy cannot access this link.

Ok, this may be fixed by "ProxyPreserveHost On" instruction on the proxy. But then comes

Trouble 2: even if the Wiki uses correct external hostname to generate the link, the _protocol_ still stays http:// and not https://
http://wiki.domain.com/index.php?title=Special:Upload&wpDestFile=Document.docx&wpForReUpload=1

So if the proxy allows HTTPS only, the link is inaccessible again for users.


Proposed solution: very simple. The link should be relative, like the rest.
Comment 1 Mark A. Hershberger 2012-02-26 21:02:35 UTC
This is fixed in the current codebase, and 1.17 doesn't have good protocol relative support anyway.  We aren't going to backport that support.  You should upgrade to 1.18 if you want better protocol-relative support.

Marking FIXED.

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


Navigation
Links