n8n-workflow
Advanced tools
Comparing version 0.152.0 to 0.153.0
@@ -45,2 +45,10 @@ "use strict"; | ||
}; | ||
const AsyncFunction = (async () => { }).constructor; | ||
const fnConstructors = { | ||
sync: Function.prototype.constructor, | ||
async: AsyncFunction.prototype.constructor, | ||
mock: () => { | ||
throw new ExpressionError_1.ExpressionError('Arbitrary code execution detected'); | ||
}, | ||
}; | ||
class Expression { | ||
@@ -206,2 +214,3 @@ constructor(workflow) { | ||
try { | ||
[Function, AsyncFunction].forEach(({ prototype }) => Object.defineProperty(prototype, 'constructor', { value: fnConstructors.mock })); | ||
return tmpl.tmpl(expression, data); | ||
@@ -233,2 +242,8 @@ } | ||
} | ||
finally { | ||
Object.defineProperty(Function.prototype, 'constructor', { value: fnConstructors.sync }); | ||
Object.defineProperty(AsyncFunction.prototype, 'constructor', { | ||
value: fnConstructors.async, | ||
}); | ||
} | ||
return null; | ||
@@ -235,0 +250,0 @@ } |
{ | ||
"name": "n8n-workflow", | ||
"version": "0.152.0", | ||
"version": "0.153.0", | ||
"description": "Workflow base code of n8n", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
675795
9188