From: Eloquence Date: Tue, 2 Sep 2014 01:25:30 +0000 (-0700) Subject: Disable JavaScript for MSIE7 users, update tests accordingly X-Git-Tag: 1.31.0-rc.0~14079^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=116d182869b413dabeb9390de8e0d9b913b9d130;p=lhc%2Fweb%2Fwiklou.git Disable JavaScript for MSIE7 users, update tests accordingly MSIE7 is outdated and unsupported (on Windows XP). It has several unpatched security vulnerabilities. [1] Supporting its JavaScript engine requires significant testing and development effort which is better spent elsewhere. This effectively demotes MSIE7 to "Grade C" status per the MediaWiki browser compatibility standards. [2] More detailed justification in [3]. [1] http://secunia.com/community/advisories/product/12366 [2] https://www.mediawiki.org/wiki/Compatibility#Grade_C [3] https://lists.wikimedia.org/pipermail/wikitech-l/2014-August/077958.html Change-Id: I2ce43dd94aba1aab947e51857d374fb9ed164228 --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index c5b6cd45fd..c7ca88bfbe 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -415,8 +415,8 @@ changes to languages because of Bugzilla reports. setPreloadedText() from EditPage.php. (deprecated since 1.21) * Removed global functions wfArrayLookup(), wfArrayMerge(), wfDebugDieBacktrace() and wfTime(). (deprecated since 1.22) -* Browser support for Internet Explorer 6 lowered from Grade A to Grade C, - meaning that JavaScript is no longer executed in this browser. +* Browser support for Internet Explorer 6 and 7 lowered from Grade A to Grade C, + meaning that JavaScript is no longer executed in these browser versions. * Browser support for Opera 11 lowered from Grade A to Grade C. * Removed IEFixes module which existed purely to provide support for MSIE versions below 7 (conditionally loaded only for those browsers). diff --git a/resources/src/startup.js b/resources/src/startup.js index 56bb3d3c10..a62cc9d664 100644 --- a/resources/src/startup.js +++ b/resources/src/startup.js @@ -25,8 +25,8 @@ function isCompatible( ua ) { // Browsers with outdated or limited JavaScript engines get the no-JS experience return !( - // Internet Explorer < 7 - ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 7 ) || + // Internet Explorer < 8 + ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 8 ) || // Firefox < 3 ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[1] ) < 3 ) || // Opera < 12 diff --git a/tests/qunit/suites/resources/startup.test.js b/tests/qunit/suites/resources/startup.test.js index 7dec626507..ed03418a9c 100644 --- a/tests/qunit/suites/resources/startup.test.js +++ b/tests/qunit/suites/resources/startup.test.js @@ -21,8 +21,7 @@ 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 OPR/15.0.1147.153', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 OPR/16.0.1196.62', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36 OPR/23.0.1522.75', - // Internet Explorer 7+ - 'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; en-US)', + // Internet Explorer 8+ 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)', 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)', 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)', @@ -43,12 +42,13 @@ 'Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17' ], gradeC: [ - // Internet Explorer < 7 + // Internet Explorer < 8 'Mozilla/2.0 (compatible; MSIE 3.03; Windows 3.1)', 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)', 'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98;)', 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)', 'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1)', + 'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; en-US)', // Firefox < 3 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2', 'Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.8.1.1) Gecko/20070311 Firefox/2.0.0.1',