欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

不要小看注釋掉的JS 引起的安全問題

 更新時間:2008年12月27日 16:46:16   作者:  
HTTP Response Splitting 攻擊主要說明的是兩個問題
一個是header插入問題。
另一個是\r\n問題。
我們來看這樣一段代碼:
1. test
2. <script>
3. //alert('<%=request.getParameter("username")%>');
4. </script>
大家都能看到,這好像有個漏洞,但是已經(jīng)被補上了,注釋掉了。
那既然注釋掉了,就不該有問題了么?
不是的。
再看這個URL
http://localhost/index.jsp?username=kxlzx%0d%0a%0d%0aalert('kxlzx
很無奈吧?
生成了如下代碼:
test
<script>
//alert('kxlzx
alert('kxlzx ');
</script>
注釋掉的JS,也執(zhí)行了。
所以,不要把沒用的代碼,注釋掉的JS等,扔到html里。
代碼審核是個細活,任何疏漏之處都值得注意。

相關(guān)文章

最新評論