mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-29 05:05:42 +00:00
fix: add check to make sure the url can be parsed
This commit is contained in:
@@ -31,9 +31,7 @@ export const ContinuePage = () => {
|
|||||||
}, 500);
|
}, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
const uri = new URL(redirectUri);
|
if (!URL.canParse(redirectUri)) {
|
||||||
|
|
||||||
if (uri === null) {
|
|
||||||
return (
|
return (
|
||||||
<ContinuePageLayout>
|
<ContinuePageLayout>
|
||||||
<Text size="xl" fw={700}>
|
<Text size="xl" fw={700}>
|
||||||
@@ -47,6 +45,8 @@ export const ContinuePage = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uri = new URL(redirectUri);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
window.location.protocol === "https:" &&
|
window.location.protocol === "https:" &&
|
||||||
uri.protocol === "http:"
|
uri.protocol === "http:"
|
||||||
|
|||||||
Reference in New Issue
Block a user