Commit 8c5e254
committed
Validate UTF-8 in scalar phongo_zval_to_bson_value path
The IS_STRING branch wrote the PHP string verbatim into the
bson_value_t without checking that it was valid UTF-8, while the
phongo_bson_append document-encoding path already validates. Match the
existing pattern so that invalid UTF-8 is rejected with an exception
in both code paths.1 parent 535ebda commit 8c5e254
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
646 | 651 | | |
647 | 652 | | |
648 | 653 | | |
| |||
0 commit comments