Commit f8bb764
committed
fix(auth): prevent authentication bypass and fix Authorization header
- Fix critical security vulnerability where non-GET requests to protected SSR routes bypassed authentication
- Add proper 401 error handling for non-GET requests to protected SSR routes
- Fix Authorization header being set to 'Bearer undefined' when bearerToken is not provided
- Make Authorization header conditional in ApiClientService based on bearerToken presence
LFXV2-417
Signed-off-by: Asitha de Silva <asithade@gmail.com>1 parent 93d05f0 commit f8bb764
File tree
2 files changed
+30
-7
lines changed- apps/lfx-pcc/src/server
- middleware
- services
2 files changed
+30
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
190 | 207 | | |
191 | 208 | | |
192 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
38 | 50 | | |
39 | 51 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
0 commit comments