* (bug 31374) Pass relevant additional parameters for action=raw on Special:Mypage...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 6 Oct 2011 01:10:39 +0000 (01:10 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 6 Oct 2011 01:10:39 +0000 (01:10 +0000)
commitf9af93f5afe6d811563a67928c6ff37ac63d435d
treeb494970410a8ac6fdd8b3a2b6452c18f9f768601
parentd6bae9f79cfe7c238d6a3e1a618b09cdef93f6ea
* (bug 31374) Pass relevant additional parameters for action=raw on Special:Mypage redirects

Found that Special:MyPage was sometimes being used in importScript() calls to make references to the owner's other user subpages, such as loading a User:Blah/monobook.js from User:Blah/vector.js.
The importScript() correctly included action=raw and ctype=text/javascript parameters, but Special:MyPage was redirecting to the actual URL and dropped the ctype parameter.

IE 9 actually now validates content-type for scripts loaded into <script> -- if and only if you send X-Content-Type-Options: nosniff. Since we now do that (since bug 15461 / r87997) this created a break for IE9 users when upgrading from MW 1.17 (without the nosniff) to MW 1.18 (with it).

Can also work around by replacing the Special:MyPage reference with a direct one.

No other browsers I tested (Firefox 8, Chrome 14, Opera 11.5) rejected a <script> load for text/x-wiki but it's a legit thing to do (Firefox does check for CSS)
includes/SpecialPage.php