Commit a46815d
committed
fix(security): escape CDR CallerID data in DataTables to prevent stored XSS
Closes #1024
- Escape src_num, dst_num via SecurityUtils.escapeHtml() in createdRow
callback (.html() rendered raw server data — direct XSS vector)
- Escape data.ids and data.DT_RowId in template literal attributes
- Add strip_tags() on CALLERID(name) and CONNECTEDLINE(name) at CDR
write time in ActionHangupChan and ActionDialAnswer (defense-in-depth)
- data-cdr-name attributes set via jQuery .attr() remain unescaped
since .attr() is DOM-safe and downstream already escapes on read1 parent 68d57de commit a46815d
4 files changed
Lines changed: 15 additions & 13 deletions
File tree
- sites/admin-cabinet/assets/js
- pbx/CallDetailRecords
- src/CallDetailRecords
- src/Core/Workers/Libs/WorkerCallEvents
Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
308 | 310 | | |
309 | 311 | | |
310 | 312 | | |
| |||
0 commit comments