Overview
| Artifact ID: | 69f6ee2930bea5477d0bcd7d93eaeca13fa7e5c8 |
|---|---|
| Ticket: | 67aa9a207037ae67f9014b544c3db34fa732f2dc
Security: Invalid UTF-8 can inject unexpected characters |
| User & Date: | jan.nijtmans on 2017-05-31 13:35:55 |
Changes
- closedate changed to: "2457905.06661097"
- icomment:
Excerpt from the wiki: More recent converters translate the first byte of an invalid sequence to a replacement character and continue parsing with the next byte. These error bytes will always have the high bit set. This avoids denial-of-service bugs, and it is very common in text rendering such as browser display, since mangled text is probably more useful than nothing for helping the user figure out what the string was supposed to contain. Popular replacements include: - The replacement character "�" (U+FFFD) (or EF BF BD in UTF-8) - The invalid Unicode code points U+DC80–U+DCFF where the low eight bits are the byte's value.[16] Sometimes it is called UTF-8B[17] - The Unicode code points U+0080–U+00FF with the same value as the byte, thus interpreting the bytes according to ISO-8859-1[citation needed] - The Unicode code point for the character represented by the byte in CP1252,[citation needed] which is similar to using ISO-8859-1, except that some characters in the range 0x80–0x9F are mapped into different Unicode code points. For example, 0x80 becomes the Euro sign, U+20AC. Tcl uses the 3th possibility for all other invalid sequences it checks for, so it makes most sense to do the same here. - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"