summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html')
-rw-r--r--LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html b/LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html
new file mode 100644
index 0000000..60d7f0c
--- /dev/null
+++ b/LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html
@@ -0,0 +1,34 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+var test = "Passed";
+
+function runTest() {
+ var t = document.getElementById("input1");
+ if (document.all) {
+ t.fireEvent("onchange");
+ } else {
+ var evt = document.createEvent("HTMLEvents");
+ evt.initEvent("change",true,true);
+ t.dispatchEvent(evt);
+ }
+
+ var r = document.getElementById("result");
+
+ if (test=="Passed")
+ r.innerHTML = "Passed";
+ else
+ r.innerHTML = "Failed";
+}
+</script>
+</head>
+<body onload="runTest();">
+<p>Test if an invalid multi-byte sequence is onverconsumed leading to an
+XSS vector</p>
+<input id="input1" src="" type="xss�">ABCD" onchange="test='Failed'" using malformed byte sequence 0x83 0x22<br>
+<div id="result"></div>
+</body>