[KVE-2026-0242]영카트주문취소시_포인트복구취약점_수정

This commit is contained in:
thisgun
2026-03-25 04:59:56 +00:00
parent ef1be317e1
commit 5e6b4fa668
2 changed files with 29 additions and 4 deletions
+21 -1
View File
@@ -2879,7 +2879,11 @@ class html_process {
$tmp_sql = " select count(*) as cnt from {$g5['login_table']} where lo_ip = '{$_SERVER['REMOTE_ADDR']}' ";
$tmp_row = sql_fetch($tmp_sql);
$http_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
if (!isset($member['mb_id'])) {
$member['mb_id'] = '';
}
if ($tmp_row['cnt']) {
$tmp_sql = " update {$g5['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '".G5_TIME_YMDHIS."', lo_location = '{$g5['lo_location']}', lo_url = '{$g5['lo_url']}' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($tmp_sql, FALSE);
@@ -4004,6 +4008,22 @@ class str_encrypt
}
}
// 26년도에 너무 늦게 만들어서 기존의 사용자들과 충돌을 피하기 위해 get_sql_affected_rows 이라 네이밍함
function get_sql_affected_rows($link=null)
{
global $g5;
if (!$link) {
$link = $g5['connect_db'];
}
if (function_exists('mysqli_affected_rows') && G5_MYSQLI_USE) {
return @mysqli_affected_rows($link);
} else {
return @mysql_affected_rows($link);
}
}
// 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴
function get_write_token($bo_table)
{
+8 -3
View File
@@ -170,11 +170,16 @@ $sql = " update {$g5['g5_shop_order_table']}
od_send_coupon = '0',
od_status = '취소',
od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G5_TIME_YMDHIS." (취소이유 : {$cancel_memo})\")
where od_id = '$od_id' ";
where od_id = '$od_id'
and od_cancel_price = 0";
sql_query($sql);
// 주문취소 회원의 포인트를 되돌려 줌
if ($od['od_receipt_point'] > 0)
insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소");
// get_sql_affected_rows 함수가 존재하지 않으면 포인트를 돌려주는것을 실행 할수 없음
$affected = function_exists('get_sql_affected_rows') ? get_sql_affected_rows() : 0;
if ($od['od_receipt_point'] > 0 && $affected) {
insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소", '@shop_order', $od_id, 'cancel');
}
goto_url(G5_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");