htmlentities()子弹证明?

fat*_*fat 6 php security xss

我问自己有关使用php函数htmlentities()对抗XSS攻击的安全性,以及可能的相关函数,如htmlspecialchars.

非常感谢 :)

Jay*_*eng 8

您需要明确指定正确的编码(例如:utf-8),Chris有一篇关于如何在没有适当编码的情况下调用htmlentities的代码.

http://shiflett.org/blog/2005/dec/google-xss-example