diff --git a/src/app/register/page.tsx b/src/app/register/page.tsx index 4c76191..b7a6b8c 100644 --- a/src/app/register/page.tsx +++ b/src/app/register/page.tsx @@ -5,11 +5,11 @@ import { redirect, useRouter } from "next/navigation"; import { ensureJpg } from "@/image"; function avatarUrlAllowed(url: URL): boolean { - let notGithub = url.hostname !== "avatars.githubusercontent.com"; - let notDiscord = url.hostname !== "cdn.discordapp.com"; + let github = url.hostname === "avatars.githubusercontent.com"; + let discord = url.hostname === "cdn.discordapp.com"; - if (!notDiscord && !url.pathname.startsWith("/avatars")) return false; - return !(notGithub && notDiscord); + if (discord && !url.pathname.startsWith("/avatars")) return false; + return github || discord; } export default async function Page({