security: KVE-2026-2140 주문 보호와 5.6.39 보안 업데이트 배포

This commit is contained in:
whitedot committed 2026-09-14 06:53:14 +00:00
1 parent 2517343d51
commit f7aa440a80
43 files changed
+1510 -328

No files matched your search

+11 -5
View File
@@ -1,5 +1,10 @@
<?php
include_once('./_common.php');
include_once(G5_LIB_PATH.'/shop_order_access.lib.php');
shop_order_state_prepare(false);
// PG 호출 전에 저장된 비회원 비밀번호 해시의 주문 소유권을 확인한다.
$saved_order_password = ($is_member || $od_settle_case === '무통장') ? null : shop_order_access_password((string)get_session('ss_order_id'));
// 구 주문서나 직접 POST로도 SIRK 전용 결제를 다시 시작하지 않는다.
if (isset($od_settle_case) && $od_settle_case === 'KAKAOPAY') {
@@ -553,7 +558,8 @@ if($tno) {
if ($is_member)
$od_pwd = $member['mb_password'];
else
$od_pwd = isset($_POST['od_pwd']) ? get_encrypt_string($_POST['od_pwd']) : get_encrypt_string(mt_rand());
$od_pwd = $saved_order_password !== null ? $saved_order_password :
(isset($_POST['od_pwd']) ? get_encrypt_string($_POST['od_pwd']) : get_encrypt_string(mt_rand()));
// 주문번호를 얻는다.
$od_id = get_session('ss_order_id');
@@ -653,6 +659,7 @@ $sql = " insert {$g5['g5_shop_order_table']}
od_cash_info = '{$pg_receipt_infos['od_cash_info']}',
od_test = '{$default['de_card_test']}'
";
shop_order_state_finalizing();
$result = sql_query($sql, false);
// 정말로 insert 가 되었는지 한번더 체크한다.
@@ -984,14 +991,13 @@ $uid = function_exists('get_shop_uid') ? get_shop_uid('order', $od_id, G5_TIME_Y
set_session('ss_orderview_uid', $uid);
// 주문 정보 임시 데이터 삭제
if($od_pg == 'inicis') {
$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' and dt_pg = '$od_pg' ";
sql_query($sql);
}
$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' and dt_pg = '$od_pg' ";
sql_query($sql);
if(function_exists('add_order_post_log')) add_order_post_log('', 'delete');
// 주문번호제거
shop_order_access_forget((string)$od_id);
set_session('ss_order_id', '');
// 기존자료 세션에서 제거