Commit graph

39 commits

Author SHA1 Message Date
Kunal Mehta
8261b1b72e Set "X-Content-Type-Options: nosniff" header in images/.htaccess
MediaWiki already sets this header unconditionally on all requests,
but images are served directly by the webserver. We want to remove the
IEContentAnalyzer, which currently provides protection against
uploading problematic files, so instead we are going to recommend
setting this header to instruct browsers to not sniff.

Per pingback data, ~83% of reporting installs use Apache.

This was suggested by Taavi.

Bug: T309787
Change-Id: I8a0c50cc0a8bc037f4c9b0a114f87793446aed7f
2023-02-24 23:59:22 -05:00
Brian Wolff
def09fd9eb Disable php in .htaccess of images directory as a hardening measure.
All our docs strongly reccomend doing this. There is even a prompt
in the installer. Not all webservers listen to this of course, but
it won't hurt things that ignore it.

The general idea is that there should be no directory that is
both writable and executable at the same time by the webserver.
images must be writable, so we should turn off php so its not executable.

Change-Id: Ic03cee12845a56a0f4f7e356493eb0f446ccf34c
2022-11-12 08:26:23 -08:00
Brian Wolff
f531634613 Remove /images .htaccess rules that are no longer relevent
The rewrite rules were removed in 164a3ac1f0. The rest of this
was just to support that. Additionally, follow sym links is not
really best practise. Sometimes this causes problems if apache
is configured with AllowOverride None (E.g. Topic:T6fd0tdieo4h8q0k)

Change-Id: Iba6c544c991f4d8aff65c4479e2f896fa290a665
2022-11-12 08:26:23 -08:00
Tim Starling
164a3ac1f0 Remove IE 6 security features from server-side code
* Deprecate WebRequest::checkUrlExtension() and have it always return
  true. This reverts the security fixes made for T30235.
* Remove IEUrlExtension. This is a helper for checkUrlExtension() which
  is not used in any extensions.
* Remove CSS sanitization code which is specific to IE6. This reverts
  the changes made to fix T57332, and related followups. I confirmed
  that the relevant test cases do not result in XSS on IE8.
* Remove related tests.

Bug: T232563
Change-Id: I7318ea4a63210252ebc64968691d4f62d79a63e9
2019-11-28 15:11:56 +11:00
wctaiwan
da6dd475f6 Change bug ID to Phabricator task ID
Change-Id: I8e1fc6ed9434a331eb7c66273305576eebed3125
2016-02-03 20:13:10 -05:00
scnd
b51645de85 images/.htaccess breaks TransformVia404 functionality
Bug: 65220
Change-Id: Ibdb91f4c676b1c77558ac806c1ccc8313ef5929f
2016-01-27 00:18:20 +00:00
kaldari
b981cf925c Add FollowSymLinks option to /images .htaccess rule
This makes sure that thumbnails load properly. Apparently
(in OSX at least), if you don't have FollowSymLinks or
SymLinksIfOwnerMatch on, loading thumbnails gives a 500
error with the existing rewrite rules in place.

Bug: 62289
Change-Id: Icc812fcf9a0b821d2ad84359e5c1d8fb8e9c78a0
2014-12-05 22:50:36 +00:00
Bartosz Dziewoński
e0b331d16b Remove some silly references to skins/common/
Change-Id: I7676de39bf43ab01776198531e337b34405b941a
2014-08-07 02:05:42 +02:00
Tim Starling
1db9197660 * Fix for bug 28534: IE 6 content type detection again
* Fix for bug 28639: user object instance cache pollution
* Release notes formatting tweak.
2011-05-05 05:29:50 +00:00
Tim Starling
7aeb423a6e (bug 28507) Fix for r85844: that revision was not actually sufficient to fix bug 28235, since URLs can have more than one question mark in them. 2011-04-14 07:10:59 +00:00
Tim Starling
3ef857fe4d Fix for bug 28235: IE6 looks for the file extension in the query string 2011-04-12 00:55:10 +00:00
Brion Vibber
f492645e53 Please keep site-specific temporary directories out of svn -- they're supposed to be locally created, so they have proper permissions and they need to not interfere with live behavior 2008-01-16 21:54:52 +00:00
Victor Vasiliev
c928250829 * Add DBA-caching to installer 2008-01-16 18:03:52 +00:00
Brion Vibber
622d7c1a8f Remove default 'deleted' directory; gets in the way and makes it impossible to delete images in a default install unless you then go on to figure out what's wrong and fix the permissions. A fresh directory will be created when needed. 2008-01-15 01:20:12 +00:00
Tim Starling
ca76169bbe * Introduced FileRepoStatus -- result class for file repo operations.
* Ported file delete/restore to the filerepo framework. Some user-visible changes in error reporting. 
* $wgSaveDeletedFiles has been removed, the feature is now enabled unconditionally. Added a "deleted" directory for the default location, protected by a .htaccess file and the practical obscurity of content hashes.
* Fixed bug 2735: "Preview" shown in title bar for action=submit on special pages
* Removed "restore" links from the deletion log embedded in Special:Undelete
* Added img_sha1/oi_sha1 fields, preserved through upload, delete and restore
* Referenced the new oi_metadata etc. fields to preserve metadata across upload and delete/restore.
2007-07-22 14:45:12 +00:00
Rob Church
96906d6cd3 (bug 6450) Update path to interface images in images/README 2006-06-26 16:52:04 +00:00
Brion Vibber
3bbf7dcbd2 Remove .cvsignore files 2006-04-05 08:23:27 +00:00
Antoine Musso
e2ab308712 +temp*
Requested by Edward Z. Yang on wikitech-l
2005-12-22 00:47:28 +00:00
Antoine Musso
d1a5064060 *** empty log message *** 2005-08-15 17:52:26 +00:00
Antoine Musso
babd8ea864 ignore one letter directories (aka any image) 2004-11-12 21:26:59 +00:00
Antoine Musso
56d2062e3a timeline and tmp as well 2004-11-12 21:05:42 +00:00
Antoine Musso
6d1497c12b ignore ./thumb* ./archive* ./math* 2004-11-12 21:00:12 +00:00
Brion Vibber
84dfedb988 User interface images have been moved to stylesheets/images. Removing the
now duplicate files from images, and fixing GNU FDL icon URL.
2004-05-08 02:55:21 +00:00
Jerome Jamnicky
3fec29827d removing Wikipedia's favicon.ico from public CVS 2004-05-04 11:25:27 +00:00
Gabriel Wicke
2534009e3d official new version (converted from gif) 2004-04-22 11:41:54 +00:00
Gabriel Wicke
b0ac86dcb0 * logo url specified in the xhtml src, uses $wgLogo
* png fix js reactivated, needs to check for activex though
2004-04-22 09:28:54 +00:00
Brion Vibber
8172d54c36 Skin updates:
* Add 'pagetitle' message to customize the HTML page title format (eg, "$1 - Wikipedia Encyclopedia")
* Some XHTML fixes to Nostalgia skin, prefs
* Removing the unfinished Smarty skins, renamed Standard to Classic
* Remove "gnunote" message in favor of general "copyright" msg, which is filled with the link & name in $wgRightsPage/$wgRightsURL and $wgRightsText
* Support a copyright-related icon as $wgRightsIcon (includes sample gnu-fdl.png)
* Show "Powered by MediaWiki" icon in footer (poweredby_mediawiki_88x31.png by Dan Carlson)
2004-04-11 01:25:00 +00:00
Gabriel Wicke
a9420d5f1f bullet image 2004-03-23 00:01:03 +00:00
Brion Vibber
536917e0c9 Remove the forced left-align in enhanced recentchanges; this screws up display for RTL languages. Added left-pointing Arr_l.png arrow for use in same. 2004-03-13 08:53:16 +00:00
Brion Vibber
3fdf19eb2e GIMP source image for the arrows 2004-03-07 00:35:48 +00:00
Brion Vibber
d27f492deb Add long-missing arrow images for enhanced recentchanges. These Arr_r.png and Arr_d.png are by Brion Vibber, made quickly in the gimp. 2004-03-07 00:33:43 +00:00
Brion Vibber
5cbf3141bd Swap nasty GIFs in toolbar for PNGs. 2004-02-28 06:02:06 +00:00
Brion Vibber
0f2fcf6321 This has not been used ever; from an experimental demo skin in early phase 2 2004-02-28 05:43:43 +00:00
Brion Vibber
105802b72f Convert to 8-bit to fix transparency in IE/Win 2004-02-22 01:21:56 +00:00
Tim Starling
315ca68b04 JeLuF's magnifying glass icon 2004-01-29 22:14:15 +00:00
Erik Moeller
c0d7690b82 nowiki button for toolbar 2004-01-19 21:40:59 +00:00
Erik Moeller
ae208c6237 images for the new edit toolbar 2004-01-11 04:02:48 +00:00
Brion Vibber
fc4316ba42 Grab MediaWiki logo from stable 2003-12-08 09:13:24 +00:00
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00