fix(auth): sanitize authorization URL
This commit is contained in:
parent
aa6a98ae52
commit
d21e51e6ab
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue