mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(core): Filter out prototype and constructor lookups in expressions (#10382)
This commit is contained in:
@@ -26,6 +26,7 @@ import { extendSyntax } from './Extensions/ExpressionExtension';
|
||||
import { evaluateExpression, setErrorHandler } from './ExpressionEvaluatorProxy';
|
||||
import { getGlobalState } from './GlobalState';
|
||||
import { ApplicationError } from './errors/application.error';
|
||||
import { sanitizer, sanitizerName } from './ExpressionSandboxing';
|
||||
|
||||
const IS_FRONTEND_IN_DEV_MODE =
|
||||
typeof process === 'object' &&
|
||||
@@ -306,6 +307,8 @@ export class Expression {
|
||||
data.extend = extend;
|
||||
data.extendOptional = extendOptional;
|
||||
|
||||
data[sanitizerName] = sanitizer;
|
||||
|
||||
Object.assign(data, extendedFunctions);
|
||||
|
||||
const constructorValidation = new RegExp(/\.\s*constructor/gm);
|
||||
|
||||
Reference in New Issue
Block a user