Commit 1267012
committed
feat(security): disable external entity loading in SVG parser
- Initializes `XMLDocument` with `.nodeLoadExternalEntitiesNever` in `SVGParser.swift`.
- Prevents XML External Entity (XXE) attacks when parsing untrusted SVG files.
- Hardens the codebase against local file inclusion and SSRF vulnerabilities via malicious SVGs.1 parent 4692a0f commit 1267012
3 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments