[KVE-2026-1785] 관리자 목록 검색필드 화이트리스트 누락 보완

검색필드가 SQL 컬럼명 위치에 검증 없이 삽입되던 관리자 목록 9개
파일에 허용 컬럼 목록을 추가한다. 허용 컬럼은 각 화면의 검색 UI가
제공하는 항목 기준이며, 미허용 값은 빈 문자열이 아닌 유효 컬럼으로
대체하여 SQL 문법 오류를 방지한다.

- adm/auth_list.php
- adm/board_list.php
- adm/boardgroup_list.php
- adm/boardgroupmember_list.php
- adm/point_list.php
- adm/poll_list.php
- adm/popular_list.php
- adm/shop_admin/inorderlist.php
- adm/shop_admin/personalpaylist.php

adm/member_list.php 의 불필요한 주석 제거

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit ff56beff8c6804013e830eb828779e02493cee52)
This commit is contained in:
thisgun
2026-08-24 07:44:22 +00:00
parent 188d0e30a0
commit 516eac386f
10 changed files with 45 additions and 1 deletions
+5
View File
@@ -8,6 +8,11 @@ if ($is_admin != 'super') {
$sql_common = " from {$g5['auth_table']} a left join {$g5['member_table']} b on (a.mb_id=b.mb_id) ";
$allowed_sfl = array('a.mb_id');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'a.mb_id';
}
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
+5
View File
@@ -12,6 +12,11 @@ if ($is_admin != "super") {
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
}
$allowed_sfl = array('bo_table', 'bo_subject', 'a.gr_id');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'bo_table';
}
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
+5
View File
@@ -20,6 +20,11 @@ if ($is_admin != 'super') {
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
}
$allowed_sfl = array('gr_subject', 'gr_id', 'gr_admin');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'gr_subject';
}
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
+5
View File
@@ -13,6 +13,11 @@ $sql_common = " from {$g5['group_member_table']} a
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
$sql_search = " where gr_id = '{$gr_id}' ";
$allowed_sfl = array('a.mb_id');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'a.mb_id';
}
// 회원아이디로 검색되지 않던 오류를 수정
if (isset($stx) && $stx) {
$sql_search .= " and ( ";
-1
View File
@@ -6,7 +6,6 @@ auth_check_menu($auth, $sub_menu, 'r');
$sql_common = " from {$g5['member_table']} ";
// $sfl 화이트리스트 검증 (KVE-2026-0340)
$allowed_sfl = array('mb_id', 'mb_nick', 'mb_name', 'mb_level', 'mb_email', 'mb_tel', 'mb_hp', 'mb_point', 'mb_datetime', 'mb_ip', 'mb_recommend');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'mb_id';
+5
View File
@@ -6,6 +6,11 @@ auth_check_menu($auth, $sub_menu, 'r');
$sql_common = " from {$g5['point_table']} po";
$allowed_sfl = array('mb_id', 'po_content');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'mb_id';
}
$sql_search = " where (1) ";
if ($stx) {
+5
View File
@@ -6,6 +6,11 @@ auth_check_menu($auth, $sub_menu, 'r');
$sql_common = " from {$g5['poll_table']} ";
$allowed_sfl = array('po_subject');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'po_subject';
}
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
+5
View File
@@ -16,6 +16,11 @@ if (isset($_POST['chk']) && is_array($_POST['chk'])) {
}
$sql_common = " from {$g5['popular_table']} a ";
$allowed_sfl = array('pp_word', 'pp_date');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'pp_word';
}
$sql_search = " where (1) ";
if ($stx) {
+5
View File
@@ -6,6 +6,11 @@ auth_check_menu($auth, $sub_menu, "r");
$sql_common = " from {$g5['g5_shop_order_data_table']} ";
$allowed_sfl = array('od_id');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'od_id';
}
$sql_search = " where cart_id <> '0' ";
if ($stx) {
$sql_search .= " and ( ";
+5
View File
@@ -6,6 +6,11 @@ auth_check_menu($auth, $sub_menu, "r");
$sql_common = " from {$g5['g5_shop_personalpay_table']} ";
$allowed_sfl = array('pp_id', 'pp_name', 'od_id');
if (!in_array($sfl, $allowed_sfl)) {
$sfl = 'pp_id';
}
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";