fix(auth): sanitize authorization URL

This commit is contained in:
superboy-zjc 2025-08-06 13:00:08 -07:00
commit d21e51e6ab

View file

@ -129,6 +129,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;
}