You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by to...@apache.org on 2022/10/07 10:39:07 UTC

[skywalking-nodejs] branch master updated: Escape HTTP method in regexp (#95)

This is an automated email from the ASF dual-hosted git repository.

tompytel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-nodejs.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ab3d0e  Escape HTTP method in regexp (#95)
9ab3d0e is described below

commit 9ab3d0ec872337bd1cf54f43fe0c29cbcc66ca0f
Author: Michael Zangl <gi...@michaelzangl.de>
AuthorDate: Fri Oct 7 12:39:02 2022 +0200

    Escape HTTP method in regexp (#95)
    
    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 bda72f2..dcfc110 100644
--- a/src/config/AgentConfig.ts
+++ b/src/config/AgentConfig.ts
@@ -100,7 +100,7 @@ export function finalizeConfig(config: AgentConfig): void {
   config.reHttpIgnoreMethod = RegExp(
     `^(?:${config
       .httpIgnoreMethod!.split(',')
-      .map((s) => s.trim())
+      .map((s) => escapeRegExp(s.trim()))
       .join('|')})$`,
     'i',
   );