Commit eea41e5
authored
Fix stored XSS via CSV Import (CVE-2023-24686) (#7674)
## What Changed
<!-- Short summary - what and why (not how) -->
Add strip_tags() sanitization to all string fields imported from CSV:
- Person fields: Title, FirstName, MiddleName, LastName, Suffix, Email,
WorkEmail
- Address fields: Address1, Address2, City, State, Zip
- Custom fields: Family and Person custom field data
This prevents XSS payloads from being stored in the database when
importing malicious CSV files.
Fixes #6442
## Type
<!-- Check one -->
- [ ] ✨ Feature
- [x] 🐛 Bug fix
- [ ] ♻️ Refactor
- [ ] 🏗️ Build/Infrastructure
- [x] 🔒 Security
## Testing
<!-- How to verify this works -->
## Screenshots
<!-- Only for UI changes - drag & drop images here -->
## Security Check
<!-- Only check if applicable -->
- [ ] Introduces new input validation
- [ ] Modifies authentication/authorization
- [ ] Affects data privacy/GDPR
### Code Quality
- [ ] Database: Propel ORM only, no raw SQL
- [ ] No deprecated attributes (align, valign, nowrap, border,
cellpadding, cellspacing, bgcolor)
- [ ] Bootstrap CSS classes used
- [ ] All CSS bundled via webpack
## Pre-Merge
- [ ] Tested locally
- [ ] No new warnings
- [ ] Build passes
- [ ] Backward compatible (or migration documented)1 file changed
+13
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
384 | 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 | 400 | | |
400 | 401 | | |
401 | | - | |
| 402 | + | |
402 | 403 | | |
403 | 404 | | |
404 | | - | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
409 | 410 | | |
| 411 | + | |
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
417 | | - | |
| 419 | + | |
418 | 420 | | |
419 | 421 | | |
420 | 422 | | |
| |||
695 | 697 | | |
696 | 698 | | |
697 | 699 | | |
698 | | - | |
| 700 | + | |
| 701 | + | |
699 | 702 | | |
700 | 703 | | |
701 | 704 | | |
| |||
748 | 751 | | |
749 | 752 | | |
750 | 753 | | |
751 | | - | |
| 754 | + | |
| 755 | + | |
752 | 756 | | |
753 | 757 | | |
754 | 758 | | |
| |||
0 commit comments