[보안패치]그누보드 영카트 SQL_injection 취약점 수정
This commit is contained in:
@@ -6,6 +6,8 @@ auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_coupon_table']} ";
|
||||
|
||||
if ($sfl && !in_array($sfl, array('mb_id', 'cp_subject', 'cp_id'))) $sfl = '';
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
|
||||
@@ -31,6 +31,9 @@ if (!$sst) {
|
||||
$sst = "iq_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('iq_id', 'a.it_id', 'it_name', 'iq_time');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'iq_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_item_qa_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
|
||||
|
||||
@@ -33,6 +33,9 @@ if (!$sst) {
|
||||
$sst = "is_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('is_id', 'a.it_id', 'it_name', 'is_name', 'is_score', 'is_time');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'is_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_item_use_table']} a
|
||||
left join {$g5['g5_shop_item_table']} b on (a.it_id = b.it_id)
|
||||
|
||||
@@ -8,6 +8,9 @@ $skin = isset($_REQUEST['skin']) ? safe_replace_regex($_REQUEST['skin'], 'skin')
|
||||
if( isset($sort) && ! in_array($sort, array('it_name', 'it_sum_qty', 'it_price', 'it_use_avg', 'it_use_cnt', 'it_update_time')) ){
|
||||
$sort='';
|
||||
}
|
||||
if( !isset($sortodr) || !in_array(strtolower($sortodr), array('asc', 'desc')) ){
|
||||
$sortodr='';
|
||||
}
|
||||
|
||||
if (G5_IS_MOBILE) {
|
||||
include_once(G5_MSHOP_PATH.'/list.php');
|
||||
|
||||
Reference in New Issue
Block a user