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

+12 -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') {
@@ -592,8 +597,8 @@ if($tno) {
if ($is_member) {
$od_pwd = $member['mb_password'];
} else {
$post_od_pwd = isset($_POST['od_pwd']) ? $_POST['od_pwd'] : sha1(rand());
$od_pwd = get_encrypt_string($_POST['od_pwd']);
$od_pwd = $saved_order_password !== null ? $saved_order_password :
get_encrypt_string(isset($_POST['od_pwd']) ? $_POST['od_pwd'] : bin2hex(random_bytes(16)));
}
// 주문번호를 얻는다.
@@ -700,6 +705,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 가 되었는지 한번더 체크한다.
@@ -717,9 +723,9 @@ if(! $result && (isset($exists_order['od_id']) && $od_id && $exists_order['od_id
// 주문정보 입력 오류시 결제 취소
if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_id'] === $od_id)) {
if($tno) {
$cancel_msg = '주문정보 입력 오류';
include G5_SHOP_PATH.'/cancel_pg.inc.php';
}
$cancel_msg = '주문정보 입력 오류';
include G5_SHOP_PATH.'/cancel_pg.inc.php';
}
// 관리자에게 오류 알림 메일발송
$error = 'order';
@@ -1053,6 +1059,7 @@ if( $od_pg == 'inicis' && $od_tno && empty($_POST['inicis_pro']) ){
if(function_exists('add_order_post_log')) add_order_post_log('', 'delete');
// 주문번호제거
shop_order_access_forget((string)$od_id);
set_session('ss_order_id', '');
// 기존자료 세션에서 제거