当前位置:网站首页>php parse_url绕过白名单

php parse_url绕过白名单

2022-07-28 14:15:00 [email protected]


    $host = parse_url($url, PHP_URL_HOST); 
    if (!in_array($host, [
        'xxx.xxx',
       
    ]))

已知这种检验,判断url的host是否在白名单中,此时可以通过http://[email protected]这种方式绕过,http://[email protected]解析host为xxx.xxx,而当浏览器访问这个网站时,\符号会变成/符号,导致绕过。

原网站

版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_38641816/article/details/108380321