Commit 1379030
authored
fix: /response-headers does not need escaping by default (#208)
The fix in commit 0decfd1 for a potential XSS vulnerability[1] in the
`/response-headers` endpoint made an unintentionally breaking change, by
HTML-escaping the body of the response when no explicit `Content-Type` is
specified in the incoming request.
We do not need to escape by default, because we default to a safe JSON content
type in that case.
[1]: GHSA-528q-4pgm-wvg21 parent 0decfd1 commit 1379030
2 files changed
+21
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
344 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
345 | 352 | | |
346 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
347 | 356 | | |
348 | 357 | | |
349 | 358 | | |
350 | 359 | | |
351 | 360 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1244 | 1251 | | |
1245 | 1252 | | |
1246 | 1253 | | |
| |||
1271 | 1278 | | |
1272 | 1279 | | |
1273 | 1280 | | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
1274 | 1285 | | |
1275 | | - | |
1276 | 1286 | | |
1277 | 1287 | | |
1278 | 1288 | | |
| |||
0 commit comments