From 986cc85be3db20e7f64f0dca3c60e1780493bf05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E5=AE=85=E7=94=B7=28YznCMS=E5=AE=98=E6=96=B9=29?= <530765310@qq.com> Date: Wed, 9 Oct 2024 09:12:24 +0000 Subject: [PATCH] =?UTF-8?q?update=20public/assets/js/require.js.=20require?= =?UTF-8?q?.js=20=E5=8E=9F=E5=9E=8B=E6=B1=A1=E6=9F=93=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 御宅男(YznCMS官方) <530765310@qq.com> --- public/assets/js/require.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/public/assets/js/require.js b/public/assets/js/require.js index 9b7f87b6..646f8ac4 100755 --- a/public/assets/js/require.js +++ b/public/assets/js/require.js @@ -1,5 +1,5 @@ /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.3.2 Copyright jQuery Foundation and other contributors. + * @license RequireJS 2.3.7 Copyright jQuery Foundation and other contributors. * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE */ //Not using strict: uneven strict support in browsers, #392, and causes @@ -11,7 +11,7 @@ var requirejs, require, define; (function (global, setTimeout) { var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.3.2', + version = '2.3.7', commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg, cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/, @@ -33,7 +33,8 @@ var requirejs, require, define; contexts = {}, cfg = {}, globalDefQueue = [], - useInteractive = false; + useInteractive = false, + disallowedProps = ['__proto__', 'constructor']; //Could match something like ')//comment', do not lose the prefix to comment. function commentReplace(match, singlePrefix) { @@ -94,7 +95,7 @@ var requirejs, require, define; function eachProp(obj, func) { var prop; for (prop in obj) { - if (hasProp(obj, prop)) { + if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) { if (func(obj[prop], prop)) { break; } @@ -165,7 +166,7 @@ var requirejs, require, define; * @returns {Error} */ function makeError(id, msg, err, requireModules) { - var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); + var e = new Error(msg + '\nhttps://requirejs.org/docs/errors.html#' + id); e.requireType = id; e.requireModules = requireModules; if (err) { @@ -440,7 +441,9 @@ var requirejs, require, define; //Account for relative paths if there is a base name. if (name) { if (prefix) { - if (pluginModule && pluginModule.normalize) { + if (isNormalized) { + normalizedName = name; + } else if (pluginModule && pluginModule.normalize) { //Plugin is loaded, use its normalize method. normalizedName = pluginModule.normalize(name, function (name) { return normalize(name, parentName, applyMap); @@ -972,7 +975,8 @@ var requirejs, require, define; //prefix and name should already be normalized, no need //for applying map config again either. normalizedMap = makeModuleMap(map.prefix + '!' + name, - this.map.parentMap); + this.map.parentMap, + true); on(normalizedMap, 'defined', bind(this, function (value) { this.map.normalizedMap = normalizedMap;