ecshop专题
ecshop注入漏洞-lib_api.php
来源:本站 作者:admin 日期:2019/6/26
漏洞名称: ecshop注入漏洞
补丁编号: 2862905
补丁文件: /api/client/includes/lib_api.php
补丁来源: 云盾自研
更新时间:
漏洞描述: ECShop存在一个盲注漏洞,问题存在于/api/client/api.php文件中,提交特制的恶意POST请求可进行SQL注入攻击,可获得敏感信息或操作数据库。【注意:该补丁为云盾自研代码修复方案,云盾会根据您当前代码是否符合云盾自研的修复模式进行检测,如果您自行采取了底层/框架统一修复、或者使用了其他的修复方案,可能会导致您虽然已经修复了改漏洞,云盾依然报告存在漏洞,遇到该情况可选择忽略该漏洞提示】
修改:api/client/includes/lib_api.php
function API_UserLogin($post)
{
if(get_magic_quotes_gpc()){
$post['UserId']=$post['UserId'];
}else{
$post['UserId']=addslashes($post['UserId']);
}
$post['username'] = isset($post['UserId']) ? trim($post['UserId']) : '';
$post['password'] = isset($post['Password']) ? strtolower(trim($post['Password'])) : '';
/* 检查密码是否正确 */
$sql = "SELECT user_id, user_name, password, action_list, last_login".
" FROM " . $GLOBALS['ecs']->table('admin_user') .
" WHERE user_name = '" . htmlspecialchars($post['username']). "'";//对用户名进行简单过滤
$row = $GLOBALS['db']->getRow($sql);
补丁编号: 2862905
补丁文件: /api/client/includes/lib_api.php
补丁来源: 云盾自研
更新时间:
漏洞描述: ECShop存在一个盲注漏洞,问题存在于/api/client/api.php文件中,提交特制的恶意POST请求可进行SQL注入攻击,可获得敏感信息或操作数据库。【注意:该补丁为云盾自研代码修复方案,云盾会根据您当前代码是否符合云盾自研的修复模式进行检测,如果您自行采取了底层/框架统一修复、或者使用了其他的修复方案,可能会导致您虽然已经修复了改漏洞,云盾依然报告存在漏洞,遇到该情况可选择忽略该漏洞提示】
修改:api/client/includes/lib_api.php
function API_UserLogin($post)
{
if(get_magic_quotes_gpc()){
$post['UserId']=$post['UserId'];
}else{
$post['UserId']=addslashes($post['UserId']);
}
$post['username'] = isset($post['UserId']) ? trim($post['UserId']) : '';
$post['password'] = isset($post['Password']) ? strtolower(trim($post['Password'])) : '';
/* 检查密码是否正确 */
$sql = "SELECT user_id, user_name, password, action_list, last_login".
" FROM " . $GLOBALS['ecs']->table('admin_user') .
" WHERE user_name = '" . htmlspecialchars($post['username']). "'";//对用户名进行简单过滤
$row = $GLOBALS['db']->getRow($sql);
想了解更多,请访问齐创互联,点击东莞网站建设查看,需要网站建设,网站制作,浏览网站模板快速建站
点击联系,联系电话:15811653920 联系人: 丁生.