来源:自学PHP网 时间:2015-04-16 23:15 作者: 阅读:次
[导读] 做完作业再看看0618补丁。非二次注入, 连载了这么多弹 有感情了。应该是最后一弹了, 看在是最后一弹了 也别再3rank了把。给高点把。一枚注入 另外一处能引入单引号或者转义符 不过也...
做完作业再看看0618补丁。 首先还是把我之前发的ecmall的那两个先确认了来下撒?
function _get_post_data($id = 0) { $goods = array( 'goods_name' => $_POST['goods_name'], 'description' => html_script($_POST['description']), 'cate_id' => $_POST['cate_id'], 'cate_name' => $_POST['cate_name'], 'brand' => $_POST['brand'], 'if_show' => $_POST['if_show'], 'last_update' => gmtime(), 'recommended' => $_POST['recommended'], 'tags' => html_script(trim($_POST['tags'])), ); $spec_name_1 = !empty($_POST['spec_name_1']) ? $_POST['spec_name_1'] : ''; $spec_name_2 = !empty($_POST['spec_name_2']) ? $_POST['spec_name_2'] : '';
case 2: // 二个规格 $goods['spec_name_1'] = $spec_name_1; $goods['spec_name_2'] = $spec_name_2; foreach ($_POST['spec_1'] as $key => $spec_1) { $spec_1 = trim($spec_1); $spec_2 = trim($_POST['spec_2'][$key]); if ($spec_1 && $spec_2) { if (($spec_id = intval($_POST['spec_id'][$key]))) // 已有规格ID的 { $specs[$key] = array( 'spec_id' => $spec_id, 'spec_1' => $spec_1, 'spec_2' => $spec_2, 'price' => $this->_filter_price($_POST['price'][$key]), 'stock' => intval($_POST['stock'][$key]), 'sku' => html_script(trim($_POST['sku'][$key])), ); }
$specs[$key] = array( 'spec_id' => $spec_id, 'spec_1' => $spec_1, 'spec_2' => $spec_2, 'price' => $this->_filter_price($_POST['price'][$key]), 'stock' => intval($_POST['stock'][$key]), 'sku' => html_script(trim($_POST['sku'][$key])), );
} /* 数据过滤 */ if (!get_magic_quotes_gpc()) { $_GET = addslashes_deep($_GET); $_POST = addslashes_deep($_POST); $_COOKIE= addslashes_deep($_COOKIE); }
function addslashes_deep($value) { if (empty($value)) { return $value; } else { return is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value); } }
function _edit_image($goods_id) { if (isset($_POST['old_order'])) { foreach ($_POST['old_order'] as $image_id => $sort_order) { $data = array('sort_order' => $sort_order); if (isset($_POST['old_url'][$image_id])) { $data['image_url'] = $_POST['old_url'][$image_id]; } $this->_image_mod->edit("image_id = '$image_id' AND goods_id = '$goods_id'", $data); } } return true; }
修复方案:过滤 转义 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com