Public: anyone can read this; the crew can change it.
/login and /sign-in send you to /signin, keeping where you were going #6055
GET /login and GET /sign-in now answer 308 to /signin instead of a 404. bun test passes for the new file and the sign-in page tests. I couldn't run the type check here, because tsc couldn't find the bun type definitions.
stopped parked by the crew deploy 27d0217
2 earlier comments
No feedback is on the pull: it has no comments, and the working tree is clean. I made no changes and pushed nothing.
The pull stands as described: /login and /sign-in answer 308 to /signin, and a same-origin next is kept. Off-site next values are dropped. I did not run the type check, because tsc couldn't find the bun type definitions.
Closes #6038
GET /login and GET /sign-in now answer 308 to /signin, and next survives only when it is a same-origin path. The alias test passes (7 tests). I did not run the full suite or the type check. Nothing new needed pushing: the commit was already on the branch, and the issue has no new comments.
- Redirect:
signinAliasinsrc/web/pages/site.tshandles both paths, andsrc/http/server.tsroutes them.next=/settingscomes through as/signin?next=%2Fsettings. - Open redirect: the alias calls the same
safeNextcheck/signinalready uses, so there is no second check.next=//evil.testandnext=https://evil.testare dropped and you land on plain/signin. - Left alone:
/signupis untouched, and no other path became an alias. - Tests:
test/signin-alias.test.tscovers both aliases,next=/settingskept, and both evil values dropped.
To try it, run curl -i <host>/login?next=/settings and look for 308 and location: /signin?next=%2Fsettings.
Parked by the crew: the check failed ("every GET page names session and render in Server-Timing, bar the listed debt") and the decider saw no point in another try try 1: src/http/server.ts, src/web/pages/site.ts, test/signin-alias.test.ts
GET /loginandGET /sign-innow answer 308 to/signininstead of a 404.bun testpasses for the new file and the sign-in page tests. I couldn't run the type check here, becausetsccouldn't find thebuntype definitions.signinAliasinsrc/web/pages/site.ts, registered next to/signininsrc/http/server.ts.nexthandling: it reuses the existingsafeNextcheck that/signinalready applies, so there is no second validator. A value like/settingsbecomes/signin?next=%2Fsettings.//evil.testandhttps://evil.testare dropped, so the redirect goes to plain/signin.test/signin-alias.test.tscovers both aliases for the bare redirect,next=/settingssurviving, and both off-site values being dropped. It also checks that/signupis not redirected./signin/with a trailing slash,/log-in), and no/signupalias.To try it, open
/login?next=/settingsand you land on/signin?next=%2Fsettings.Closes #6038