diff --git a/packages/http-client/src/index.ts b/packages/http-client/src/index.ts index 1512c2cd..80d81aed 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