Commit 94aee4f
authored
Reject unescaped control characters in JSON strings (#1663)
RFC 8259 requires that control characters (U+0000-U+001F) be escaped
when they appear inside strings. jsoncpp previously accepted them
silently. Add a check in Reader::decodeString and
OurReader::decodeString to return an error when an unescaped control
character is encountered.
Fixes #15461 parent 8661f9e commit 94aee4f
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
| 659 | + | |
658 | 660 | | |
659 | 661 | | |
660 | 662 | | |
| |||
1690 | 1692 | | |
1691 | 1693 | | |
1692 | 1694 | | |
| 1695 | + | |
| 1696 | + | |
1693 | 1697 | | |
1694 | 1698 | | |
1695 | 1699 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments