Files
Gnuboard5/adm/shop_admin/itemuseformupdate.php
thisgunandClaude Opus 4.8 935ea84c7c [KVE-2026-1122]취약점 수정 - 주문·관리자·결제·소셜 등 사용자 입력 처리 보완
- 쿠폰/희망배송일/검색어/계정/결제 콜백 등 입력값을 SQL 컨텍스트에 맞게 재처리
- dt_data·PG 응답 등 비-GPC 값과 소셜 provider 입력 정제 보완

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 00:36:35 +00:00

52 lines
1.5 KiB
PHP

<?php
$sub_menu = '400650';
include_once('./_common.php');
check_demo();
if ($w == 'd')
auth_check_menu($auth, $sub_menu, "d");
else
auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$posts = array();
$check_keys = array('is_subject', 'is_content', 'is_confirm', 'is_reply_subject', 'is_reply_content', 'is_id');
foreach($check_keys as $key){
if( in_array($key, array('is_content', 'is_reply_content')) ){
$posts[$key] = isset($_POST[$key]) ? $_POST[$key] : '';
} else if( $key === 'is_id' ) {
$posts[$key] = isset($_POST[$key]) ? (int) $_POST[$key] : 0;
} else {
$posts[$key] = isset($_POST[$key]) ? addslashes(clean_xss_tags(stripslashes($_POST[$key]), 1, 1)) : '';
}
}
if ($w == "u")
{
$sql = "update {$g5['g5_shop_item_use_table']}
set is_subject = '".$posts['is_subject']."',
is_content = '".$posts['is_content']."',
is_confirm = '".$posts['is_confirm']."',
is_reply_subject = '".$posts['is_reply_subject']."',
is_reply_content = '".$posts['is_reply_content']."',
is_reply_name = '".$member['mb_nick']."'
where is_id = '".$posts['is_id']."'";
sql_query($sql);
run_event('shop_admin_item_use_updated', $posts['is_id']);
if( isset($_POST['it_id']) ) {
update_use_cnt($_POST['it_id']);
update_use_avg($_POST['it_id']);
}
goto_url("./itemuseform.php?w=$w&amp;is_id=$is_id&amp;sca=$sca&amp;$qstr");
}
else
{
alert();
}