.. / sea.js
Star Fork

Sea.js is a module loader for the web. It is designed to change the way that you organize JavaScript. With Sea.js, it is pleasure to build scalable web applications.

seajs
seajs
...

Latest | CVE-2024-51091

<img> @src @name 🛡️ strict-dynamic ⏱️ before-call
More information

Root Cause

Source: https://github.com/seajs/seajs/blob/master/src/util-path.js#L231-L247

var doc = document
var scripts = doc.scripts

// Recommend to add `seajsnode` id for the `sea.js` script element
var loaderScript = doc.getElementById("seajsnode") ||
  scripts[scripts.length - 1]

function getScriptAbsoluteSrc(node) {
  return node.hasAttribute ? // non-IE6/7
    node.src :
    // see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
    node.getAttribute("src", 4)
}
loaderPath = getScriptAbsoluteSrc(loaderScript)
// When `sea.js` is inline, set loaderDir to current working directory
loaderDir = dirname(loaderPath || cwd)

Related links:

Found by jackfromeast, ishmeals.


Source | History