fix minor bug

This commit is contained in:
MathMan05
2025-12-15 20:00:33 -06:00
parent da45638187
commit 81edcd7188
2 changed files with 2 additions and 2 deletions

View File

@@ -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";

View File

@@ -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";