MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / safeReturnTo

Function safeReturnTo

apps/cloud/src/auth/return-to.ts:24–25  ·  view source on GitHub ↗
(path: string | null | undefined)

Source from the content-addressed store, hash-verified

22
23/** The validated returnTo, or null when absent/unsafe. */
24export const safeReturnTo = (path: string | null | undefined): string | null =>
25 path && isSafeReturnTo(path) ? path : null;
26
27/** The /login URL that comes back to `returnTo` ("/" needs no parameter). */
28export const loginPath = (returnTo: string): string =>

Callers 5

ssr-gate.tsFile · 0.90
handlers.tsFile · 0.90
return-to.test.tsFile · 0.90
login.tsxFile · 0.90
LoginPageFunction · 0.90

Calls 1

isSafeReturnToFunction · 0.70

Tested by

no test coverage detected