Commit 5eee582
committed
fix: sanitize query parameter in DateController to prevent security vulnerabilities
- Add proper validation for newsId parameter in newsAction()
- Check for null/non-numeric values and return appropriate error responses
- Add validation for positive integer constraint
- Add null check for news object to prevent potential issues
- Return proper HTTP status codes (400 for bad request, 404 for not found)1 parent 107da53 commit 5eee582
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
62 | 77 | | |
63 | 78 | | |
64 | 79 | | |
| |||
0 commit comments