Files

6 lines
273 B
TypeScript

/** Only origin-relative application paths may be used after login. */
export function safeLoginRedirect(value: string | null): string {
if (!value || !value.startsWith("/") || value.startsWith("//") || /[\\\u0000-\u0020]/.test(value)) return "/konto";
return value;
}