lego-bigpipe
Advanced tools
Comparing version 0.1.5 to 0.1.6
'use strict'; | ||
var vm = require('vm'); | ||
var ejs = require('ejs'); | ||
@@ -34,6 +33,6 @@ var tpl = { | ||
if (data.source && data.data) { | ||
var sandbox = {module: {}}; | ||
var code = 'var exports=module.exports={};' + data.data; | ||
vm.runInNewContext(code, sandbox); | ||
pagelet.html = ejs.render(data.source, {locals: sandbox.module.exports}); | ||
var module = {exports: {}}; | ||
/*jshint evil: true */ | ||
(new Function('module', data.data))(module); | ||
pagelet.html = ejs.render(data.source, {locals: module.exports}); | ||
} else if (data.source) { | ||
@@ -40,0 +39,0 @@ pagelet.html = data.source; |
{ | ||
"name": "lego-bigpipe", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "a bigpipe builder for scrat-lego", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
0
11976
328
1