Skip to content

Commit

Permalink
Merge pull request #220 from flavorjones/flavorjones-test-css-hex-enc…
Browse files Browse the repository at this point in the history
…oded-exploit

test: use CSS hex-encoded strings to test sanitization
  • Loading branch information
flavorjones committed Oct 29, 2021
2 parents 369a54f + 587177d commit 483a7e7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/assets/testdata_sanitizer_tests1.dat
Expand Up @@ -61,6 +61,20 @@
"output": "<div>foo</div>"
},

{
/* and put that version into a CSS hex-encoded string */
"name": "div_background_image_unicode_encoded5",
"input": "<DIV STYLE=\"background-image:\\0075\\0072\\006C\\0028\\0027\\006a\\0061\\0076\\0061\\0073\\0063\\0072\\0069\\0070\\0074\\003a\\0061\\006c\\0065\\0072\\0074\\0028\\0031\\0032\\0033\\0034\\0029\\0027\\0029\">foo</div>",
"output": "<div>foo</div>"
},

{
/* and again without encoding the parens */
"name": "div_background_image_unicode_encoded6",
"input": "<DIV STYLE=\"background-image:\\0075\\0072\\006C(\\0027\\006a\\0061\\0076\\0061\\0073\\0063\\0072\\0069\\0070\\0074\\003a\\0061\\006c\\0065\\0072\\0074\\0028\\0031\\0032\\0033\\0034\\0029\\0027)\">foo</div>",
"output": "<div>foo</div>"
},

{
"name": "div_expression",
"input": "<div style=\"width: expression(alert('XSS'));\">foo</div>",
Expand Down

0 comments on commit 483a7e7

Please sign in to comment.