Skip to content
Tcl Source Code Artifact [69f6ee2930]
Login

Artifact [69f6ee2930]

Artifact 69f6ee2930bea5477d0bcd7d93eaeca13fa7e5c8:

Ticket change [69f6ee2930] - Ticket [67aa9a207037ae67|67aa9a2070] <i>Security: Invalid UTF-8 can inject unexpected characters</i> status still Closed with 4 other changes by jan.nijtmans on 2017-05-31 13:35:55.
D 2017-05-31T13:35:55.188
J closedate 2457905.06661097
J icomment Excerpt\sfrom\sthe\swiki:\r\n\r\nMore\srecent\sconverters\stranslate\sthe\sfirst\sbyte\sof\san\sinvalid\ssequence\sto\sa\sreplacement\scharacter\sand\scontinue\sparsing\swith\sthe\snext\sbyte.\sThese\serror\sbytes\swill\salways\shave\sthe\shigh\sbit\sset.\sThis\savoids\sdenial-of-service\sbugs,\sand\sit\sis\svery\scommon\sin\stext\srendering\ssuch\sas\sbrowser\sdisplay,\ssince\smangled\stext\sis\sprobably\smore\suseful\sthan\snothing\sfor\shelping\sthe\suser\sfigure\sout\swhat\sthe\sstring\swas\ssupposed\sto\scontain.\sPopular\sreplacements\sinclude:\r\n\r\n\s\s\s\s-\sThe\sreplacement\scharacter\s"�"\s(U+FFFD)\s(or\sEF\sBF\sBD\sin\sUTF-8)\r\n\r\n\s\s\s\s-\sThe\sinvalid\sUnicode\scode\spoints\sU+DC80–U+DCFF\swhere\sthe\slow\seight\sbits\sare\sthe\sbyte's\svalue.[16]\sSometimes\sit\sis\scalled\sUTF-8B[17]\r\n\r\n\s\s\s\s-\sThe\sUnicode\scode\spoints\sU+0080–U+00FF\swith\sthe\ssame\svalue\sas\sthe\sbyte,\sthus\sinterpreting\sthe\sbytes\saccording\sto\sISO-8859-1[citation\sneeded]\r\n\r\n\s\s\s\s-\sThe\sUnicode\scode\spoint\sfor\sthe\scharacter\srepresented\sby\sthe\sbyte\sin\sCP1252,[citation\sneeded]\swhich\sis\ssimilar\sto\susing\sISO-8859-1,\sexcept\sthat\ssome\scharacters\sin\sthe\srange\s0x80–0x9F\sare\smapped\sinto\sdifferent\sUnicode\scode\spoints.\sFor\sexample,\s0x80\sbecomes\sthe\sEuro\ssign,\sU+20AC.\r\n\r\nTcl\suses\sthe\s3th\spossibility\sfor\sall\sother\sinvalid\ssequences\sit\schecks\sfor,\sso\sit\smakes\smost\ssense\sto\sdo\sthe\ssame\shere.
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K 67aa9a207037ae67f9014b544c3db34fa732f2dc
U jan.nijtmans
Z 86b0e0fee2ca1b8559795bdd02361892