Home >Backend Development >PHP Tutorial >ThinkPHP 防止XSS攻击

ThinkPHP 防止XSS攻击

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 14:24:571590browse

XSS(跨站脚本攻击)可以用于窃取其他用户的Cookie信息,要避免此类问题,可以采用如下解决方案:

1.过滤所有的JavaScript脚本;

2.Html元字符,使用htmlentities、htmlspecialchars等函数;

3.的扩展函数库提供了XSS安全过滤的remove_xss方法;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn