ECSHOP /api/client/includes/lib_api.php

Posted James的博客园

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ECSHOP /api/client/includes/lib_api.php相关的知识,希望对你有一定的参考价值。

 

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]) : ‘‘;

 

以上是关于ECSHOP /api/client/includes/lib_api.php的主要内容,如果未能解决你的问题,请参考以下文章