Skip to content

Commit

Permalink
remove cross-site-scripting
Browse files Browse the repository at this point in the history
  • Loading branch information
AshrafMd-1 committed Oct 27, 2023
1 parent e422a39 commit 3e30c02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Components/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export const Login = (props: { forgot?: boolean }) => {
redirectParam &&
new URL(redirectParam).origin === window.location.origin
)
window.location.href = redirectParam;
window.location.href =
window.location.origin + new URL(redirectParam).pathname;
else window.location.href = "/facility";
} catch {
window.location.href = "/facility";
Expand Down

0 comments on commit 3e30c02

Please sign in to comment.