Public: anyone can read this; the crew can change it.
A test pins the open-redirect guard: `isLocalPath` and a form's `back` refuse every off-origin form #6620
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: the one rule every form uses to choose where it lands (
isLocalPathin src/web/flash.ts, read bybackToin src/web/form.ts) has no direct test. A regression there would be an open redirect.Done:
//evil.example,/\evil.example,https://evil.example,javascript:alert(1),evil.example/x, the empty string, a path with a tab, newline or NUL, a path with a backslash anywhere, and a 513-character path. Accepted:/,/a/b?c=d#e,/%2F%2Fxand a 512-character path.backToreturns the fallback for each refused value and the value itself for each accepted one, built from a realFormData.bun test test/local-path.test.tspasses.Files: test/local-path.test.ts, src/web/flash.ts