From b9a72b82b2ff7197d9c4cc7512bc2e4a0e2a1bcb Mon Sep 17 00:00:00 2001 From: Dima Rifai <dima.rifai@gmail.com> Date: Mon, 6 Jan 2025 14:36:53 +0200 Subject: [PATCH] Issue #412 - Validate Account in route starts with @ --- pages/[accountName].tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/[accountName].tsx b/pages/[accountName].tsx index b005d128..bd665412 100644 --- a/pages/[accountName].tsx +++ b/pages/[accountName].tsx @@ -283,10 +283,11 @@ export default function Account() { ? router.query.accountName[0] // If it's an array, get the first element : router.query.accountName; // Otherwise, treat it as a string directly - if(routeAccountName && !routeAccountName.startsWith("@") || !accountNameFromRoute) + if(routeAccountName && !routeAccountName.startsWith("@")) { return <ErrorPage />; } + if (!accountDetails) { return ( <Loader2 className="animate-spin mt-1 text-black dark:text-white h-12 w-12 ml-3 ..." /> -- GitLab