From d356915f47fb3fdfed7704f134d94bdfab4cc287 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 1 Oct 2026 16:49:18 +0000 Subject: [PATCH] fix: strip trigger variable brackets in one step replace() only removed the first angle bracket, so a token with more than one bracket would keep the rest. Trigger variables are a single pair, and the key is now taken from the characters between those brackets. Co-authored-by: David --- utils/validators.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/validators.ts b/utils/validators.ts index 6f4c2eaa..20c5d59a 100644 --- a/utils/validators.ts +++ b/utils/validators.ts @@ -232,7 +232,8 @@ interface TriggerSignature { function getSignaturePayload (postData: string, postDataParameters: PostDataParameters): string { const includedVariables = TRIGGER_POST_VARIABLES.filter(v => postData.includes(v)).sort() const result = includedVariables.map(varString => { - const key = varString.replace('<', '').replace('>', '') as keyof PostDataParameters + // Tokens in TRIGGER_POST_VARIABLES are a single `` pair. + const key = varString.slice(1, -1) as keyof PostDataParameters let valueString = '' if (key === 'opReturn') { const value = postDataParameters[key]