Commit 735569b
Fix review issues: redirect validation, status codes, stale comments, error wrapping
- Add isValidRedirectParam() and sanitizeRedirectSearchParam() helpers
with reactive RedirectSanitized state for toast notification
- Extract REDIRECT_QUERY_PARAM constant and use across all call sites
- Sanitize invalid redirect params in hooks.client.ts init() using
native browser APIs (runs before SvelteKit router init)
- Show warning toast via root layout $effect when a bad param is stripped
- Change 308 → 303 redirects in shockers and /t endpoints
- Validate redirect_uri scheme (HTTP/S only) in API token page
- Update stale comments referencing deprecated function
- Include original error message in GetBasePath error wrapping
- Add tests for new helpers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5a8f0c1 commit 735569b
File tree
14 files changed
+616
-32
lines changed- src
- lib
- api
- state
- utils
- routes
- (anonymous)
- login
- (authenticated)
- settings/api-tokens/new
- shockers
- t
14 files changed
+616
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments