Compare commits

..

2 Commits

Author SHA1 Message Date
Stavros
b1dc5cb4cc fix: add check to make sure the url can be parsed 2025-02-11 18:50:33 +02:00
Stavros
3c9bc8c67f fix: use new URL instead of URL.parse 2025-02-11 18:31:31 +02:00

View File

@@ -31,9 +31,7 @@ export const ContinuePage = () => {
}, 500); }, 500);
}; };
const urlParsed = URL.parse(redirectUri); if (!URL.canParse(redirectUri)) {
if (urlParsed === null) {
return ( return (
<ContinuePageLayout> <ContinuePageLayout>
<Text size="xl" fw={700}> <Text size="xl" fw={700}>
@@ -47,9 +45,11 @@ export const ContinuePage = () => {
); );
} }
const uri = new URL(redirectUri);
if ( if (
window.location.protocol === "https:" && window.location.protocol === "https:" &&
urlParsed.protocol === "http:" uri.protocol === "http:"
) { ) {
return ( return (
<ContinuePageLayout> <ContinuePageLayout>