Commit 3475a80
fix: Add type validation for username in eloRank and leaderboard APIs
- eloRank.js: Add typeof check for username parameter
- leaderboard.js: Add typeof check for myUsername query param
Prevents NoSQL injection via ?username[$ne]=foo query strings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent ec56163 commit 3475a80
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| |||
0 commit comments