ecshop购物车订单XSS漏洞修复
//打开文件
flow.php
查找
$order['from_ad'] = !empty($_SESSION['from_ad']) ? $_SESSION['from_ad'] : '0'; //$order['referer'] = !empty($_SESSION['referer']) ? addslashes($_SESSION['referer']) : '';
替换为
/* 购物车订单XSS by tbadc.com begin */ //$order['from_ad'] = !empty($_SESSION['from_ad']) ? $_SESSION['from_ad'] : '0'; //$order['referer'] = !empty($_SESSION['referer']) ? addslashes($_SESSION['referer']) : ''; $order['from_ad'] = !empty($_SESSION['from_ad']) && preg_match('/^-?[1-9]\d*$/', $_REQUEST['id']) ? $_SESSION['from_ad'] : '0'; //$order['referer'] = !empty($_SESSION['referer']) && preg_match('/^-?[1-9]\d*$/', $_REQUEST['id']) ? addslashes($_SESSION['referer']) : ''; /* 购物车订单XSS by tbadc.com end */
压缩包flow_bak.php是备份文件,不用理。