[KVE-2018-2443] 영카트 SQL Injection 취약점 수정
This commit is contained in:
@ -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'
|
||||
|
||||
@ -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 = '';
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user