Move hyphen to end of character class for cleaner regex
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
This commit is contained in:
1 parent
fbde669eef
commit
dede5d42d0
1 file changed
+1
-1
+1
-1
@@ -822,7 +822,7 @@ export class HttpClient {
|
|||||||
if (orchId) {
|
if (orchId) {
|
||||||
// Sanitize the orchestration ID to ensure it contains only valid token characters
|
// Sanitize the orchestration ID to ensure it contains only valid token characters
|
||||||
// Valid characters: alphanumeric, !, #, $, %, &, ', *, +, -, ., ^, _, `, |, ~
|
// 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} github_orchestration_id/${sanitizedId}`
|
||||||
}
|
}
|
||||||
return userAgent
|
return userAgent
|
||||||
|
|||||||
Reference in new issue
Block a user