python-xss-filter icon indicating copy to clipboard operation
python-xss-filter copied to clipboard

<img src="javascript:alert()">这个没过滤

Open tabris17 opened this issue 10 years ago • 4 comments

如果没记错的话,IE6是会执行这段js的

tabris17 avatar Sep 02 '15 08:09 tabris17

浏览器版本:IE7+ 或其他浏览器,无法防御IE6及以下版本浏览器中的XSS

IE6~8中有太多你意想不到的特性,不光是你说的这个。为避免伤害高雅,不建议兼容IE6~8。 建议使用python-xss-filter的网站严禁IE6浏览器访问。

phith0n avatar Sep 02 '15 17:09 phith0n

顺便一提,另外还有两个CSS相关的: style="background: url('javascript:alert')" style="behavior:url('xss.htc')"

不过也都是IE下的,第二个应该IE高版本也会触发

tabris17 avatar Sep 07 '15 07:09 tabris17

upczww avatar Nov 29 '16 07:11 upczww

style="behavior:url('xss.htc')" 需要同源下的xss.htc才能触发。 style的过滤后面慢慢增加吧,不光是xss问题,style属性还会带来很多别的问题,所以建议暂时在源码中去除style属性的支持。

phith0n avatar Dec 04 '16 13:12 phith0n