Skip to content

Commit eb91943

Browse files
Update to Drupal 7.66. For more information, see https://www.drupal.org/project/drupal/releases/7.66
1 parent 95bf99b commit eb91943

File tree

5 files changed

+128
-1
lines changed

5 files changed

+128
-1
lines changed

CHANGELOG.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Drupal 7.xx, xxxx-xx-xx (development version)
22
-----------------------
33

4+
Drupal 7.66, 2019-04-17
5+
-----------------------
6+
- Fixed security issues:
7+
- SA-CORE-2019-006
8+
49
Drupal 7.65, 2019-03-20
510
-----------------------
611
- Fixed security issues:

includes/bootstrap.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* The current system version.
1010
*/
11-
define('VERSION', '7.65');
11+
define('VERSION', '7.66');
1212

1313
/**
1414
* Core API compatibility.

misc/jquery-extend-3.4.0.js

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/**
2+
* For jQuery versions less than 3.4.0, this replaces the jQuery.extend
3+
* function with the one from jQuery 3.4.0, slightly modified (documented
4+
* below) to be compatible with older jQuery versions and browsers.
5+
*
6+
* This provides the Object.prototype pollution vulnerability fix to Drupal
7+
* installations running older jQuery versions, including the versions shipped
8+
* with Drupal core and https://www.drupal.org/project/jquery_update.
9+
*
10+
* @see https://github.com/jquery/jquery/pull/4333
11+
*/
12+
13+
(function (jQuery) {
14+
15+
// Do not override jQuery.extend() if the jQuery version is already >=3.4.0.
16+
var versionParts = jQuery.fn.jquery.split('.');
17+
var majorVersion = parseInt(versionParts[0]);
18+
var minorVersion = parseInt(versionParts[1]);
19+
var patchVersion = parseInt(versionParts[2]);
20+
var isPreReleaseVersion = (patchVersion.toString() !== versionParts[2]);
21+
if (
22+
(majorVersion > 3) ||
23+
(majorVersion === 3 && minorVersion > 4) ||
24+
(majorVersion === 3 && minorVersion === 4 && patchVersion > 0) ||
25+
(majorVersion === 3 && minorVersion === 4 && patchVersion === 0 && !isPreReleaseVersion)
26+
) {
27+
return;
28+
}
29+
30+
/**
31+
* This is almost verbatim copied from jQuery 3.4.0.
32+
*
33+
* Only two minor changes have been made:
34+
* - The call to isFunction() is changed to jQuery.isFunction().
35+
* - The two calls to Array.isArray() is changed to jQuery.isArray().
36+
*
37+
* The above two changes ensure compatibility with all older jQuery versions
38+
* (1.4.4 - 3.3.1) and older browser versions (e.g., IE8).
39+
*/
40+
jQuery.extend = jQuery.fn.extend = function() {
41+
var options, name, src, copy, copyIsArray, clone,
42+
target = arguments[ 0 ] || {},
43+
i = 1,
44+
length = arguments.length,
45+
deep = false;
46+
47+
// Handle a deep copy situation
48+
if ( typeof target === "boolean" ) {
49+
deep = target;
50+
51+
// Skip the boolean and the target
52+
target = arguments[ i ] || {};
53+
i++;
54+
}
55+
56+
// Handle case when target is a string or something (possible in deep copy)
57+
if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
58+
target = {};
59+
}
60+
61+
// Extend jQuery itself if only one argument is passed
62+
if ( i === length ) {
63+
target = this;
64+
i--;
65+
}
66+
67+
for ( ; i < length; i++ ) {
68+
69+
// Only deal with non-null/undefined values
70+
if ( ( options = arguments[ i ] ) != null ) {
71+
72+
// Extend the base object
73+
for ( name in options ) {
74+
copy = options[ name ];
75+
76+
// Prevent Object.prototype pollution
77+
// Prevent never-ending loop
78+
if ( name === "__proto__" || target === copy ) {
79+
continue;
80+
}
81+
82+
// Recurse if we're merging plain objects or arrays
83+
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
84+
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
85+
src = target[ name ];
86+
87+
// Ensure proper type for the source value
88+
if ( copyIsArray && !jQuery.isArray( src ) ) {
89+
clone = [];
90+
} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
91+
clone = {};
92+
} else {
93+
clone = src;
94+
}
95+
copyIsArray = false;
96+
97+
// Never move original objects, clone them
98+
target[ name ] = jQuery.extend( deep, clone, copy );
99+
100+
// Don't bring in undefined values
101+
} else if ( copy !== undefined ) {
102+
target[ name ] = copy;
103+
}
104+
}
105+
}
106+
}
107+
108+
// Return the modified object
109+
return target;
110+
};
111+
112+
})(jQuery);

modules/system/system.install

+7
Original file line numberDiff line numberDiff line change
@@ -3300,6 +3300,13 @@ function system_update_7081() {
33003300
->execute();
33013301
}
33023302

3303+
/**
3304+
* Add 'jquery-extend-3.4.0.js' to the 'jquery' library.
3305+
*/
3306+
function system_update_7082() {
3307+
// Empty update to force a rebuild of hook_library() and JS aggregates.
3308+
}
3309+
33033310
/**
33043311
* @} End of "defgroup updates-7.x-extra".
33053312
* The next series of updates should start at 8000.

modules/system/system.module

+3
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,9 @@ function system_library() {
11821182
'version' => '1.4.4',
11831183
'js' => array(
11841184
'misc/jquery.js' => array('group' => JS_LIBRARY, 'weight' => -20),
1185+
// This includes a security fix, so assign a weight that makes this load
1186+
// as soon after jquery.js is loaded as possible.
1187+
'misc/jquery-extend-3.4.0.js' => array('group' => JS_LIBRARY, 'weight' => -19),
11851188
),
11861189
);
11871190

0 commit comments

Comments
 (0)