Commit 2434907
committed
minor #61951 [Serializer] Escape values starting with line feed when using
This PR was merged into the 7.4 branch.
Discussion
----------
[Serializer] Escape values starting with line feed when using `csv_escape_formulas`
| Q | A
| ------------- | ---
| Branch? | 7.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
Change `CsvEncoder` so that it follows the latest OWASP guidelines on CSV injection. When escape formulas is enabled it will escape values starting with a line feed. This is in addition other the other starting characters of equals, plus, minus, at sign, tab, and carriage return.
[OWASP: CSV Injection](https://owasp.org/www-community/attacks/CSV_Injection)
Commits
-------
d544c8737a0 [Serializer] CsvEncoder to escape values starting with line feed when escape formulas is enabledcsv_escape_formulas (Peter Mead)2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
313 | 322 | | |
314 | 323 | | |
315 | 324 | | |
| |||
438 | 447 | | |
439 | 448 | | |
440 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
441 | 461 | | |
442 | 462 | | |
443 | 463 | | |
| |||
0 commit comments