Skip to content

Commit 7c6aa4d

Browse files
committed
AC-12901: Require.js upgrade to the latest version 2.3.7 (security vulnerability CVE-2024-38999)
1 parent 672a2e6 commit 7c6aa4d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/web/requirejs/require.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** vim: et:ts=4:sw=4:sts=4
2-
* @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors.
2+
* @license RequireJS 2.3.7 Copyright jQuery Foundation and other contributors.
33
* Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
44
*/
55
//Not using strict: uneven strict support in browsers, #392, and causes
@@ -11,7 +11,7 @@ var requirejs, require, define;
1111
(function (global, setTimeout) {
1212
var req, s, head, baseElement, dataMain, src,
1313
interactiveScript, currentlyAddingScript, mainScript, subPath,
14-
version = '2.3.6',
14+
version = '2.3.7',
1515
commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,
1616
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
1717
jsSuffixRegExp = /\.js$/,
@@ -33,7 +33,8 @@ var requirejs, require, define;
3333
contexts = {},
3434
cfg = {},
3535
globalDefQueue = [],
36-
useInteractive = false;
36+
useInteractive = false,
37+
disallowedProps = ['__proto__', 'constructor'];
3738

3839
//Could match something like ')//comment', do not lose the prefix to comment.
3940
function commentReplace(match, singlePrefix) {
@@ -94,7 +95,7 @@ var requirejs, require, define;
9495
function eachProp(obj, func) {
9596
var prop;
9697
for (prop in obj) {
97-
if (hasProp(obj, prop)) {
98+
if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) {
9899
if (func(obj[prop], prop)) {
99100
break;
100101
}

0 commit comments

Comments
 (0)