Commit 1be9493
committed
Enhance security and error handling in webhook and tracking APIs
- In `renew-webhooks.post.ts`, implemented fixed-length buffers for comparing CRON secrets to prevent timing attacks.
- Updated error handling to throw a 403 status for invalid cron secrets.
- In `track/[code].get.ts`, added a check for the `BETTER_AUTH_URL` environment variable and throw a 500 error if misconfigured.
- Ensured `ref` parameter in redirect URLs is properly encoded to prevent potential issues with special characters.1 parent 877d03c commit 1be9493
4 files changed
Lines changed: 537 additions & 159 deletions
File tree
- app/components
- server/api
- calendar
- public/track
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments