fix: add check to make sure the url can be parsed

This commit is contained in:
Stavros
2025-02-11 18:50:33 +02:00
parent 3c9bc8c67f
commit b1dc5cb4cc

View File

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