修复整理ecshop漏洞
2021-03-11 10:06:48
ADMIN
1、ECShop存在一个盲注漏洞,问题存在于/api/client/api.php文件中,提交特制的恶意POST请求可进行SQL注入攻击,可获得敏感信息或操作数据库。
路径:/api/client/includes/lib_api.php
参照以下修改:
推荐(免费):eschop
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']) : '';登录后复制