Files
silo-server/web/src/lib/authRedirect.ts
T

13 lines
249 B
TypeScript

export function sanitizeAuthRedirect(value: string | null | undefined): string | null {
if (!value) {
return null;
}
if (!value.startsWith("/")) {
return null;
}
if (value.startsWith("//")) {
return null;
}
return value;
}