mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-03-30 17:45:40 +00:00
fix minor bug
This commit is contained in:
@@ -81,7 +81,7 @@ export async function makeLogin(
|
||||
return;
|
||||
}
|
||||
const redir = new URLSearchParams(window.location.search).get("goback");
|
||||
if (redir) {
|
||||
if (redir && (!URL.canParse(redir) || new URL(redir).host === window.location.host)) {
|
||||
window.location.href = redir;
|
||||
} else {
|
||||
window.location.href = "/channels/@me";
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function makeRegister(
|
||||
return;
|
||||
}
|
||||
const redir = new URLSearchParams(window.location.search).get("goback");
|
||||
if (redir) {
|
||||
if (redir && (!URL.canParse(redir) || new URL(redir).host === window.location.host)) {
|
||||
window.location.href = redir;
|
||||
} else {
|
||||
window.location.href = "/channels/@me";
|
||||
|
||||
Reference in New Issue
Block a user