From fbde669eef77356e49afc00109c782bd6fe1e34b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 16:28:52 +0000 Subject: [PATCH] Fix regex to properly escape hyphen in character class Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com> --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 852377c..1512c2c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -822,7 +822,7 @@ export class HttpClient { if (orchId) { // Sanitize the orchestration ID to ensure it contains only valid token characters // Valid characters: alphanumeric, !, #, $, %, &, ', *, +, -, ., ^, _, `, |, ~ - const sanitizedId = orchId.replace(/[^a-zA-Z0-9!#$%&'*+\-.^_`|~]/g, '_') + const sanitizedId = orchId.replace(/[^a-zA-Z0-9!#$%&'*+.\-^_`|~]/g, '_') return `${userAgent} github_orchestration_id/${sanitizedId}` } return userAgent