Compare commits

..

3 Commits

Author SHA1 Message Date
Stavros
6f35923735 refactor: use try catch instead of can parse 2025-02-12 18:43:35 +02:00
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,11 @@ export const ContinuePage = () => {
}, 500); }, 500);
}; };
const urlParsed = URL.parse(redirectUri); let uri;
if (urlParsed === null) { try {
uri = new URL(redirectUri);
} catch {
return ( return (
<ContinuePageLayout> <ContinuePageLayout>
<Text size="xl" fw={700}> <Text size="xl" fw={700}>
@@ -49,7 +51,7 @@ export const ContinuePage = () => {
if ( if (
window.location.protocol === "https:" && window.location.protocol === "https:" &&
urlParsed.protocol === "http:" uri.protocol === "http:"
) { ) {
return ( return (
<ContinuePageLayout> <ContinuePageLayout>