Spaces:
Sleeping
Sleeping
assafvayner HF Staff
fix(ui): shared safe-next validation, no lockout on success, logout origin check, tab/feed polish
b11153a Download src/lib/server/auth/safe-next.ts from assafvayner/splitwise: direct link, hf CLI and curl.
- Browser
- Download file 182 Bytes
-
https://huggingface.co/spaces/assafvayner/splitwise/resolve/main/src/lib/server/auth/safe-next.ts
- Command line
-
hf download hf://spaces/assafvayner/splitwise/src/lib/server/auth/safe-next.ts
-
curl -L -o safe-next.ts https://huggingface.co/spaces/assafvayner/splitwise/resolve/main/src/lib/server/auth/safe-next.ts
182 Bytes
| export const SAFE_NEXT = /^\/([^/\\]|$)/; | |
| export function safeNext(next: string | null, fallback = '/'): string { | |
| return next !== null && SAFE_NEXT.test(next) ? next : fallback; | |
| } | |