Last modified: 2012-09-26 22:59:12 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 T42527, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40527 - action=raw doesn't work for pages with a dot in it
action=raw doesn't work for pages with a dot in it
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-26 11:57 UTC by Christian Thiele
Modified: 2012-09-26 22:59 UTC (History)
3 users (show)

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


Attachments

Description Christian Thiele 2012-09-26 11:57:05 UTC
Normally it's easy to get the raw text of an article adding "?action=raw" to the normal URL, like

http://de.wikipedia.org/wiki/Nekrolog_2003?action=raw

equal to the info page

http://de.wikipedia.org/wiki/Nekrolog_2003?action=info

This does not work if the page name contains a dot:

http://de.wikipedia.org/wiki/Nekrolog_1._Quartal_2006?action=raw
(I get "Forbidden: Invalid file extension found in the path info or query string.")

The info page works:

http://de.wikipedia.org/wiki/Nekrolog_1._Quartal_2006?action=info

I know that there are other possibilites to get the raw text, but it think this should work, too.
Comment 1 Dereckson 2012-09-26 17:33:29 UTC
To be exhaustive, it should be noted the canonical URL http//de.wikipedia.org/w/index.php?title=Nekrolog_1._Quartal_2006&action=raw works.
Comment 2 Brion Vibber 2012-09-26 20:28:23 UTC
This is a protection against content type autodetection on older versions of Internet Explorer.

Use the canonical URL so the .blah isn't at the end of the URL path.
Comment 3 Krinkle 2012-09-26 22:39:17 UTC
This is not a bug, it is on purpose and by design for security reasons.

Dots in that position can cause Internet Explorer to assume HTML parsing, raw content must only be served when the extension is controlled (i.e. .php).

Aside from that, you shouldn't be constructing urls like this yourself. If you like to write your own urls, do follow the format the software uses, because the software will never create a url that follows the structure of one action combined with another (e.g. view action url, like /wiki/Page_name with action query).

Which, for actions not otherwise specified (by default none), is index.php?title=&action= and that works.

I'd say this is an instance of DontDoThat, the software doesn't lead there so its not a problem.

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


Navigation
Links