Merge pull request #687 from superboy-zjc/main
fix(auth): sanitize authorization URL
This commit is contained in:
commit
2feac764ff
1 changed files with 6 additions and 0 deletions
|
|
@ -134,6 +134,12 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
redirectToAuthorization(authorizationUrl: URL) {
|
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;
|
window.location.href = authorizationUrl.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue