[KVE-2026-1176]취약점수정 - 관리자 목록 정렬 파라미터 화이트리스트 적용 보완
- member_list·index·couponzonelist·inorderlist·personalpaylist의 정렬 컬럼/방향 값을 허용 목록으로 제한하여 ORDER BY 절에 임의 값 삽입 차단 - 기존 다른 목록 파일과 동일한 in_array 화이트리스트 패턴 적용 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
935ea84c7c
commit
8a5767dc70
@@ -35,6 +35,10 @@ if (!auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$sod = "desc";
|
||||
}
|
||||
|
||||
$allowed_sst = array('mb_datetime');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'mb_datetime';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
|
||||
@@ -42,6 +42,10 @@ if (!$sst) {
|
||||
$sod = "desc";
|
||||
}
|
||||
|
||||
$allowed_sst = array('mb_datetime', 'mb_id', 'mb_name', 'mb_nick', 'mb_level', 'mb_point', 'mb_today_login', 'mb_open', 'mb_mailling', 'mb_sms', 'mb_adult', 'mb_certify', 'mb_email_certify', 'mb_intercept_date', 'mb_leave_date');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'mb_datetime';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
|
||||
@@ -15,6 +15,9 @@ if (!$sst) {
|
||||
$sst = "cz_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('cz_id');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'cz_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
|
||||
@@ -24,6 +24,9 @@ if (!$sst) {
|
||||
$sst = "od_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('od_id');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'od_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
|
||||
@@ -27,6 +27,9 @@ if (!$sst) {
|
||||
$sst = "pp_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$allowed_sst = array('pp_id', 'od_id', 'pp_receipt_time');
|
||||
if ($sst && !in_array($sst, $allowed_sst)) $sst = 'pp_id';
|
||||
if ($sod && !in_array(strtolower($sod), array('asc', 'desc'))) $sod = '';
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
|
||||
Reference in New Issue
Block a user