Commit f0bb02e
bug: fix open redirect in routes/index.js (SonarQube jssecurity:S5146)
Restrict the post-login redirect target to same-site relative paths so a
user-controlled value (req.body.redirectPage) can no longer trigger an
open redirect to an external site. Addresses SonarQube issue
AZhSVLrd4wErqc9Ey1Y4 (rule jssecurity:S5146) at routes/index.js:61.
Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>1 parent d240896 commit f0bb02e
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
60 | | - | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| |||
0 commit comments