File:  [parser3project] / parser3 / tests / 186.html
Revision 1.5: download - view: text, annotated - select for diffs - revision graph
Sun Dec 29 18:39:00 2013 UTC (12 years, 5 months ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, release_3_4_6, release_3_4_5, release_3_4_4, HEAD
^string:js-unescape result now tainted, issue #966

$request:charset[utf-8]

$sValue[abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789
`+-=~!@#^$%^^&*()_
[]{}<>^;:'",./?

абвгдеёжзийклмнопрстуфхцчшщъыьэюя	АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ]

<hr />
Origin:
<pre>
=^taint[html][$sValue]=
</pre>


<hr />
$sEscapedValue[^sValue.js-escape[]]
Escaped:
<pre>
=^taint[html][$sEscapedValue]=
</pre>


<hr />
$sUnescapedValue[^string:js-unescape[$sEscapedValue]]
Unescaped [^if($sUnescapedValue eq $sValue){equal to source}{NOT equal to source}]:
<pre>
=$sUnescapedValue=
</pre>


<hr />
Empty string escape/unescape:
$v[]
$s[$v]
<pre>
=^s.js-escape[]=
=^string:js-unescape[$s]=
</pre>


<hr />
# replace %uXXXX to \uXXXX and check escaping again
$sEscapedValue2[^sEscapedValue.match[%u][gi]{\u}]
<pre>
=^taint[html][$sEscapedValue2]=
</pre>
$sUnescapedValue2[^string:js-unescape[$sEscapedValue2]]
Unescaped [^if($sUnescapedValue2 eq $sValue){equal to source}{NOT equal to source}]

E-mail: