2.21.12 (#423)
* chore: bump version to 2.21.12 and implement safe redirect path validation - Updated application version from 2.21.11 to 2.21.12 in package.json. - Introduced `getSafeRedirectPath` and `isSafeRedirectPath` utility functions to validate user-supplied redirect URLs, enhancing security against open redirect attacks. * fix: address page reload issue in Admin tests for CI
This commit is contained in:
committed by
GitHub
parent
2f78e16dfa
commit
44137016cb
@@ -3,6 +3,7 @@ import { Metadata } from 'next';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
import { AuthLayoutShell } from '@kit/auth/shared';
|
||||
import { getSafeRedirectPath } from '@kit/shared/utils';
|
||||
import { requireUser } from '@kit/supabase/require-user';
|
||||
import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
||||
import { Heading } from '@kit/ui/heading';
|
||||
@@ -96,7 +97,7 @@ async function fetchData(props: IdentitiesPageProps) {
|
||||
}
|
||||
|
||||
// Get the next path from URL params (where to redirect after setup)
|
||||
const nextPath = searchParams.next || pathsConfig.app.home;
|
||||
const nextPath = getSafeRedirectPath(searchParams.next, pathsConfig.app.home);
|
||||
|
||||
// Available auth methods to add
|
||||
const showPasswordOption = authConfig.providers.password;
|
||||
|
||||
Reference in New Issue
Block a user