[KVE-2018-2443] 영카트 SQL Injection 취약점 수정

This commit is contained in:
thisgun
2019-02-13 12:19:19 +09:00
parent f121c8e708
commit b6d9260f3a
3 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,11 @@
<?php
include_once('./_common.php');
// 상품 리스트에서 다른 필드로 정렬을 하려면 아래의 배열 코드에서 해당 필드를 추가하세요.
if( isset($sort) && ! in_array($sort, array('it_sum_qty', 'it_price', 'it_use_avg', 'it_use_cnt', 'it_update_time')) ){
$sort='';
}
$sql = " select *
from {$g5['g5_shop_category_table']}
where ca_id = '$ca_id'

View File

@ -4,6 +4,7 @@ include_once('../common.php');
if (isset($_REQUEST['sort'])) {
$sort = trim($_REQUEST['sort']);
$sort = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\s]/", "", $sort);
$sort = preg_replace("/(--|#|\/\*|\*\/)/", "", $sort);
} else {
$sort = '';
}

View File

@ -1,6 +1,11 @@
<?php
include_once('./_common.php');
// 상품 리스트에서 다른 필드로 정렬을 하려면 아래의 배열 코드에서 해당 필드를 추가하세요.
if( isset($sort) && ! in_array($sort, array('it_sum_qty', 'it_price', 'it_use_avg', 'it_use_cnt', 'it_update_time')) ){
$sort='';
}
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/list.php');
return;