The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(workflows): align variable regex with validation and prevent ReDoS (#16607)
Abdullah.1f1a1ea138b7
diff --git a/packages/twenty-shared/src/utils/variable-resolver.ts b/packages/twenty-shared/src/utils/variable-resolver.tsindex 92e5bcb2089..7e7b1a8fde1 100644--- a/packages/twenty-shared/src/utils/variable-resolver.ts+++ b/packages/twenty-shared/src/utils/variable-resolver.ts@@ -8,7 +8,7 @@ const isString = (value: any): value is string => {return typeof value === 'string';};-const VARIABLE_PATTERN = RegExp('\\{\\{(.*?)\\}\\}', 'g');+const VARIABLE_PATTERN = RegExp('\\{\\{([^{}]+)\\}\\}', 'g');export const resolveInput = (unresolvedInput: unknown,