From 557f80fd037f5c2bdd77b18d78a08c7cfce8b9b0 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> --- packages/http-client/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/http-client/src/index.ts b/packages/http-client/src/index.ts index 852377c5..1512c2cd 100644 --- a/packages/http-client/src/index.ts +++ b/packages/http-client/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