mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 12:45:47 +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);
|
||||
};
|
||||
|
||||
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:"
|
||||
|
||||
Reference in New Issue
Block a user