From 11a26c82af7831e435a61ecfbf3f26565c246d9e Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 24 Jul 2026 02:11:05 +0000 Subject: [PATCH] =?UTF-8?q?[KVE-2026-1639]=20=EC=87=BC=ED=95=91=EB=AA=B0?= =?UTF-8?q?=20=EC=A3=BC=EB=AC=B8=EC=A0=95=EB=B3=B4=20=EC=A0=91=EA=B7=BC?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=20=EC=9A=B0=ED=9A=8C=20=EC=B7=A8=EC=95=BD?= =?UTF-8?q?=EC=A0=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (cherry picked from commit d3e8ffc3d6a0af4e2abe9b798316ae1c504e7d37) --- lib/shop.lib.php | 7 ++++--- shop/orderinquiryview.php | 3 ++- shop/taxsave.php | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 8ad6a79e4..9eed841b5 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -30,7 +30,7 @@ function get_shop_uid($type, $id, $time, $ip) * 현금영수증 발급 또는 조회에 대한 검증 * * 다음 셋 중 하나여야 접근 허용: - * 1. 관리자 + * 1. 최고관리자 (게시판/그룹 관리자 권한은 제외) * 2. 본인 주문/개인결제 (로그인 회원이고 mb_id 일치) * 3. 비회원이지만 정당한 세션 uid 보유 (orderinquiry.php에서 비밀번호 검증 통과 후 * 또는 주문 완료 직후 세션에 저장된 ss_orderview_uid / ss_personalpay_uid가 @@ -48,8 +48,9 @@ function is_shop_order_owner($od, $type = 'order') return false; } - // 관리자 - if ($is_admin) { + // 최고관리자만 전체 주문/개인결제 접근 허용 + // (요청 bo_table 로 좌우되는 게시판/그룹 관리자 문맥은 인정하지 않음) + if ($is_admin === 'super') { return true; } diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php index ad4fc510b..675e0dbfe 100644 --- a/shop/orderinquiryview.php +++ b/shop/orderinquiryview.php @@ -19,7 +19,8 @@ if (!$is_member) { $tot_point = 0; $sql = "select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "; -if($is_member && !$is_admin) +// 최고관리자가 아니면 로그인 회원 본인 주문만 조회 (게시판/그룹 관리자 문맥으로 우회 불가) +if($is_member && $is_admin !== 'super') $sql .= " and mb_id = '{$member['mb_id']}' "; $od = sql_fetch($sql); diff --git a/shop/taxsave.php b/shop/taxsave.php index 916e25351..bf40c7c05 100644 --- a/shop/taxsave.php +++ b/shop/taxsave.php @@ -42,7 +42,7 @@ if($tx == 'personalpay') { alert('해당 주문 정보에 접근 권한이 없습니다.', G5_SHOP_URL); } - if ( ! $is_admin && ! (shop_is_taxsave($od)) ){ + if ( $is_admin !== 'super' && ! (shop_is_taxsave($od)) ){ die('해당 주문은 현금영수증을 발급할수 없습니다.'); }