Skip to content

Commit 1c99578

Browse files
author
Test User
committed
fix(backend): correct recursive loop-guard check in username redirects
1 parent e1f3804 commit 1c99578

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/backend/src/routes/public.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function publicRoutes(app: FastifyInstance): Promise<void> {
3030

3131
const visited = new Set<string>();
3232

33-
while (redirect && redirect.createdAt >= ninetyDaysAgo && !visited.has(current)) {
33+
while (redirect && redirect.createdAt >= ninetyDaysAgo && !visited.has(redirect.newUsername)) {
3434
visited.add(current);
3535
current = redirect.newUsername;
3636
redirect = await app.prisma.usernameRedirect.findUnique({

0 commit comments

Comments
 (0)