From 0d96c45449b2199568532cf35c1e3f5746f7ef84 Mon Sep 17 00:00:00 2001 From: Michael Zangl Date: Fri, 7 Oct 2022 12:17:49 +0200 Subject: [PATCH] Escape HTTP method in regexp In previous versions, the HTTP method was not escaped and could cause issues in regexp if special characters had been used. --- src/config/AgentConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/AgentConfig.ts b/src/config/AgentConfig.ts index 8394a61..8c994cd 100644 --- a/src/config/AgentConfig.ts +++ b/src/config/AgentConfig.ts @@ -91,7 +91,7 @@ export function finalizeConfig(config: AgentConfig): void { config.reHttpIgnoreMethod = RegExp( `^(?:${config .httpIgnoreMethod!.split(',') - .map((s) => s.trim()) + .map((s) => escapeRegExp(s.trim())) .join('|')})$`, 'i', );