【发布时间】:2019-09-10 06:50:11
【问题描述】:
有没有办法绕过输入清理并进行 HTML 注入。
这是 bWAPP 的一个练习。当我尝试进行 HTMLi 时,会检查输入验证并清理特殊字符。附加了清理代码,是否有其他方法可以绕过代码并进行 HTML 注入?
function xss_check_3($data, $encoding="UTF-8")
{
// htmlspecialchars - convert specialchars to HTML entities
// '&'(ampersand) becomes '&'
// '"'(double quotes) becomes '"' when ENT_NOQUOTES is not set
// "'"(Single quotes) becomes ''' (or ') only when ENT_QUOTES is
set
// '<'(lessthan) becomes '<'``
// '>'(greterthan) becomes '>'
return htmlspecialchars($data, ENT_QUOTES, $encoding);
}
【问题讨论】:
标签: php html owasp javascript-injection websecurity