ecshop /api/client/api.php、/api/client/includes/lib_api.php

 

ECShop存在一个盲注漏洞,问题存在于/api/client/api.php文件中,提交特制的恶意POST请求可进行SQL注入攻击,可获得敏感信息或操作数据库。

 

参照以下修改:

function API_UserLogin($post)
{
    /* SQL注入过滤 */
    if (get_magic_quotes_gpc()) 
    {     
        $post['UserId'] = $post['UserId']     
    } 
    else 
    {     
        $post['UserId'] = addslashes($post['UserId']);     
    }
    /* end */
    $post['username'] = isset($post['UserId']) ? trim($post['UserId']) : '';

 

相关文章:

  • 2022-12-23
  • 2022-01-17
  • 2022-02-04
  • 2022-02-13
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
猜你喜欢
  • 2021-10-10
  • 2021-06-21
  • 2021-12-06
  • 2021-12-08
  • 2022-12-23
  • 2022-01-19
  • 2021-08-15
相关资源
相似解决方案