漏洞修复,严重度【中】,修复两个ECSHOP官方遗留的漏洞,可能造成SQL注入
漏洞修复,严重度【中】,修复两个ECSHOP官方遗留的漏洞,可能造成SQL注入。
客户们最好都尽快修改一下。15:40分钟前处理的第三条少了个;号,注意一下。
1、includes/modules/payment/alipay.php
找到:
$order_sn = trim($order_sn);
修改为:
$order_sn = trim(addslashes($order_sn));
2、有手机版的客户,请找到mobile/includes/modules/payment/alipay.php
找到:
$order_sn = trim($order_sn);
修改为:
$order_sn = trim(addslashes($order_sn));
3、找到文件:api/client/includes/lib_api.php。此漏洞为服务器未默认开启自动转义的情况下产生。
找到:
$post['username'] = isset($post['UserId']) ? trim($post['UserId']) : '';
替换为:
if (get_magic_quotes_gpc()) {
$post['UserId']=$post['UserId'] ;
} else {
$post['UserId']=addslashes($post['UserId']);
}
$post['username'] = isset($post['UserId']) ? trim($post['UserId']) : '';