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);
};
const urlParsed = URL.parse(redirectUri);
let uri;
if (urlParsed === null) {
try {
uri = new URL(redirectUri);
} catch {
return (
<ContinuePageLayout>
<Text size="xl" fw={700}>
@@ -49,7 +51,7 @@ export const ContinuePage = () => {
if (
window.location.protocol === "https:" &&
urlParsed.protocol === "http:"
uri.protocol === "http:"
) {
return (
<ContinuePageLayout>