New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vm2

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vm2 - npm Package Compare versions

Comparing version 3.6.10 to 3.6.11

5

CHANGELOG.md

@@ -0,1 +1,6 @@

v3.6.11 (2019-04-08)
-------------------
[fix] Contextification of EvalError and URIError
[fix] Security fixes
v3.6.10 (2019-01-28)

@@ -2,0 +7,0 @@ -------------------

36

lib/contextify.js

@@ -330,11 +330,11 @@ /* global host */

Decontextify.value = (value, traps, deepTraps, flags, mock) => {
if (Contextified.has(value)) {
// Contextified object has returned back from vm
return Contextified.get(value);
} else if (Decontextify.proxies.has(value)) {
// Decontextified proxy already exists, reuse
return Decontextify.proxies.get(value);
}
try {
if (Contextified.has(value)) {
// Contextified object has returned back from vm
return Contextified.get(value);
} else if (Decontextify.proxies.has(value)) {
// Decontextified proxy already exists, reuse
return Decontextify.proxies.get(value);
}
try {
switch (typeof value) {

@@ -353,2 +353,4 @@ case 'object':

} else if (instanceOf(value, VMError)) { return Decontextify.instance(value, host.VMError, deepTraps, flags);
} else if (instanceOf(value, EvalError)) { return Decontextify.instance(value, host.EvalError, deepTraps, flags);
} else if (instanceOf(value, URIError)) { return Decontextify.instance(value, host.URIError, deepTraps, flags);
} else if (instanceOf(value, Error)) { return Decontextify.instance(value, host.Error, deepTraps, flags);

@@ -624,11 +626,11 @@ } else if (instanceOf(value, Array)) { return Decontextify.instance(value, host.Array, deepTraps, flags);

Contextify.value = (value, traps, deepTraps, flags, mock) => {
if (Decontextified.has(value)) {
// Decontextified object has returned back to vm
return Decontextified.get(value);
} else if (Contextify.proxies.has(value)) {
// Contextified proxy already exists, reuse
return Contextify.proxies.get(value);
}
try {
if (Decontextified.has(value)) {
// Decontextified object has returned back to vm
return Decontextified.get(value);
} else if (Contextify.proxies.has(value)) {
// Contextified proxy already exists, reuse
return Contextify.proxies.get(value);
}
try {
switch (typeof value) {

@@ -647,2 +649,4 @@ case 'object':

} else if (instanceOf(value, host.VMError)) { return Contextify.instance(value, VMError, deepTraps, flags);
} else if (instanceOf(value, host.EvalError)) { return Contextify.instance(value, EvalError, deepTraps, flags);
} else if (instanceOf(value, host.URIError)) { return Contextify.instance(value, URIError, deepTraps, flags);
} else if (instanceOf(value, host.Error)) { return Contextify.instance(value, Error, deepTraps, flags);

@@ -649,0 +653,0 @@ } else if (instanceOf(value, host.Array)) { return Contextify.instance(value, Array, deepTraps, flags);

@@ -123,2 +123,3 @@ /* eslint-disable global-require, no-use-before-define */

Error,
EvalError,
RangeError,

@@ -128,2 +129,3 @@ ReferenceError,

TypeError,
URIError,
RegExp,

@@ -176,3 +178,3 @@ Function,

this._internal.Contextify.readonly(value);
if (global) this._internal.Contextify.globalValue(value, globalName);
if (globalName) this._internal.Contextify.globalValue(value, globalName);
return value;

@@ -192,3 +194,3 @@ }

this._internal.Contextify.protected(value);
if (global) this._internal.Contextify.globalValue(value, globalName);
if (globalName) this._internal.Contextify.globalValue(value, globalName);
return value;

@@ -274,2 +276,3 @@ }

Error,
EvalError,
RangeError,

@@ -279,2 +282,3 @@ ReferenceError,

TypeError,
URIError,
RegExp,

@@ -281,0 +285,0 @@ Function,

@@ -16,3 +16,3 @@ {

],
"version": "3.6.10",
"version": "3.6.11",
"main": "index.js",

@@ -23,3 +23,3 @@ "repository": "github:patriksimek/vm2",

"devDependencies": {
"eslint": "^5.11.1",
"eslint": "^5.16.0",
"eslint-config-integromat": "^1.5.0",

@@ -26,0 +26,0 @@ "mocha": "^5.2.0"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc