Fix login return routes and recovery feedback
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 6m29s
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 6m29s
This commit is contained in:
@@ -84,7 +84,22 @@ test("authentication redirects accept supported local routes and reject open red
|
||||
assert.equal(authDestination(next), "/dashboard");
|
||||
assert.equal(authDestination("/settings"), "/settings");
|
||||
assert.equal(authDestination("/servers"), "/servers");
|
||||
const tournamentMap = "/tournaments?map=123e4567-e89b-12d3-a456-426614174000";
|
||||
const id = "123e4567-e89b-12d3-a456-426614174000";
|
||||
for (const next of [
|
||||
"/ban/appeal",
|
||||
"/dev/api",
|
||||
"/admin",
|
||||
"/moderation",
|
||||
"/tournaments",
|
||||
`/servers/${id}`,
|
||||
`/tournaments/${id}`,
|
||||
])
|
||||
assert.equal(authDestination(next), next);
|
||||
assert.equal(
|
||||
authDestination(`/servers/${id}?next=//evil.example`),
|
||||
"/dashboard",
|
||||
);
|
||||
const tournamentMap = `/tournaments?map=${id}`;
|
||||
assert.equal(authDestination(tournamentMap), tournamentMap);
|
||||
assert.equal(
|
||||
authDestination(`${tournamentMap}&next=//evil.example`),
|
||||
|
||||
Reference in New Issue
Block a user