refactor(#89): Address PR comments

This commit is contained in:
Josh Creek
2026-01-24 17:26:55 +00:00
parent 8141bd624b
commit 86e8d6f5e6
3 changed files with 18 additions and 3 deletions
@@ -13,7 +13,9 @@ export const GET = async (event: RequestEvent) => {
const folderId = url.searchParams.get('folderId');
const returnToRaw = url.searchParams.get('returnTo');
const returnTo =
returnToRaw && returnToRaw.startsWith('/') ? returnToRaw : '/backup-settings';
returnToRaw && returnToRaw.startsWith('/') && !returnToRaw.startsWith('//')
? returnToRaw
: '/backup-settings';
if (pokedexId) {
const { session } = await event.locals.safeGetSession();