通过XMLHttpRequest进行盲URL SQL注入

时间:2019-01-08 11:55:48

标签: sql mysqli sql-injection

我已经在我的网站上进行了安全扫描,现在我收到此警告:

  

盲SQL注入HTTP标头输入Client-IP设置为   (select(0)from(select(sleep(0)))v)/ '+(select(0)from(select(sleep(0)))v)+'“ +(select(0)from (select(sleep(0)))v)+“ /

遇到问题的我的网址:

....category/category.php?cat=1&pn=1

此URL的SQL注入:

....category/category.php?cat=10&pn=%f0''%f0""

我的网站上有一个安全脚本,该脚本阻止所有SQL注入并重定向。

$cat = mysqli_query($connection, "SELECT * FROM categories");

$cate = mysqli_real_escape_string($connection, @$_REQUEST['cat']);

    $product = mysqli_query($connection, "SELECT * FROM articles WHERE category='$cate' $limit ");

    // show article only with category choose
    while($row = mysqli_fetch_assoc($product)) {

        $id_article =   $row['id'];
        $user_article = $row['user_id'];
        $pic_article = $row['ppicture'];
        $tit_article = $row['title'];
        $descri_article = $row['description'];
        $descri_sh_article = $row['description_sh'];
        $pri_article = $row['price'];

但是,如果我仅信任安全脚本或必须解决该问题,便可以节省?

任何人都知道如何阻止htaccess文件中的URL请求?

非常感谢

0 个答案:

没有答案