From c450f8bbdebeb086d9aa41a47fce825cd829761d Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 24 Jul 2026 02:58:34 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EA=B6=8C?= =?UTF-8?q?=ED=95=9C=20=EB=AC=B8=EB=A7=A5=20=EC=98=A4=EC=97=BC=20=EA=B3=84?= =?UTF-8?q?=EC=97=B4=20=EC=A0=91=EA=B7=BC=EA=B6=8C=ED=95=9C=20=EC=A0=90?= =?UTF-8?q?=EA=B2=80=20=EB=B0=8F=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 게시판/그룹 관리자 문맥(bo_table)으로 타 회원 콘텐츠에 접근·변조되지 않도록 $is_admin 판정을 최고관리자(super) 기준으로 통일. - bbs/poll_etc_update.php : 설문 기타의견 삭제 소유권 - shop/itemqaformupdate.php : 상품문의 수정/삭제 소유권 - shop/itemuseformupdate.php : 사용후기 삭제 소유권 - bbs/current_connect.php : 게스트 IP 원본 표기 - shop/kakaopay/kakaopay_cancel.php : TID 기반 결제취소 Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 46a005129464d1fbab518fcb70bf524b258e65fc) --- bbs/current_connect.php | 2 +- bbs/poll_etc_update.php | 3 ++- shop/itemqaformupdate.php | 4 ++-- shop/itemuseformupdate.php | 2 +- shop/kakaopay/kakaopay_cancel.php | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bbs/current_connect.php b/bbs/current_connect.php index 38650a622..4d7c8c593 100644 --- a/bbs/current_connect.php +++ b/bbs/current_connect.php @@ -18,7 +18,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) { if ($row['mb_id']) { $list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']); } else { - if ($is_admin) + if ($is_admin === 'super') $list[$i]['name'] = $row['lo_ip']; else $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']); diff --git a/bbs/poll_etc_update.php b/bbs/poll_etc_update.php index 860887fdb..8cd00b6b9 100644 --- a/bbs/poll_etc_update.php +++ b/bbs/poll_etc_update.php @@ -61,7 +61,8 @@ else if ($w == 'd') if ($member['mb_id'] || $is_admin == 'super') { $sql = " delete from {$g5['poll_etc_table']} where pc_id = '{$pc_id}' "; - if (!$is_admin) + // 최고관리자가 아니면 본인 기타의견만 삭제 (게시판/그룹 관리자 문맥으로 우회 불가) + if ($is_admin !== 'super') $sql .= " and mb_id = '{$member['mb_id']}' "; sql_query($sql); } diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php index 364466027..dc232c91d 100644 --- a/shop/itemqaformupdate.php +++ b/shop/itemqaformupdate.php @@ -57,7 +57,7 @@ if ($w == "") } else if ($w == "u") { - if (!$is_admin) + if ($is_admin !== 'super') { $sql = " select count(*) as cnt from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; $row = sql_fetch($sql); @@ -86,7 +86,7 @@ else if ($w == "u") } else if ($w == "d") { - if (!$is_admin) + if ($is_admin !== 'super') { $sql = " select iq_answer from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; $row = sql_fetch($sql); diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php index 358a2c376..c95afa12f 100644 --- a/shop/itemuseformupdate.php +++ b/shop/itemuseformupdate.php @@ -91,7 +91,7 @@ else if ($w == "u") } else if ($w == "d") { - if (!$is_admin) + if ($is_admin !== 'super') { $sql = " select count(*) as cnt from {$g5['g5_shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' "; $row = sql_fetch($sql); diff --git a/shop/kakaopay/kakaopay_cancel.php b/shop/kakaopay/kakaopay_cancel.php index 94ffdd75e..cdb3800f3 100644 --- a/shop/kakaopay/kakaopay_cancel.php +++ b/shop/kakaopay/kakaopay_cancel.php @@ -50,7 +50,7 @@ if($cancelFlag == "true") $db_check = 1; $cancel_msg = "DB FAIL"; - if( $is_admin ){ + if( $is_admin === 'super' ){ $tmp = sql_fetch("select * from `{$g5['g5_shop_order_table']}` where od_tno = '".trim($_REQUEST['TID'])."' "); if( $tmp['od_pg'] === 'KAKAOPAY' ){