Merge pull request #687 from superboy-zjc/main

fix(auth): sanitize authorization URL
This commit is contained in:
Cliff Hall 2025-08-12 16:29:07 -04:00 • committed by GitHub
commit 2feac764ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -134,6 +134,12 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
}
redirectToAuthorization(authorizationUrl: URL) {
if (
authorizationUrl.protocol !== "http:" &&
authorizationUrl.protocol !== "https:"
) {
throw new Error("Authorization URL must be HTTP or HTTPS");
}
window.location.href = authorizationUrl.href;
}