Compare commits

...
27 Commits
Author SHA1 Message Date
thisgun af92ea064e 버전 5.6.8 수정 2024-11-26 17:36:29 +09:00
thisgun dab5abb89a NHN_KCP 휴대폰 본인인증 인증키 입력없이 사용할수 있도록 적용 2024-11-26 17:33:04 +09:00
thisgun 8893b112fa 일부 특수문자가 mysql charset 이 uft8 인 경우 기록이 안되는 현상 수정 2024-11-21 11:58:55 +09:00
thisgun d65fa99e3c CloudFlare 환경과 적용에 대한 코드 다시 재수정 2024-11-04 16:13:43 +09:00
thisgun 29381da2ce 버전 5.6.7 수정 2024-10-31 16:19:11 +09:00
thisgun d96f47f93d NHN_KCP 휴대폰 본인인증 설정 가맹점 인증키 추가 2024-10-31 12:17:26 +09:00
thisgun 830994b637 소셜로그인 테이블 PK 수정 2024-10-28 10:55:14 +09:00
thisgun 0d586e2101 htmlpurifier 4.15.0 버전으로 수정 2024-10-25 17:52:55 +09:00
thisgun 5e6549a22c 영카트 관리자페이지 주문내역출력 페이지 코드 수정 2024-10-25 16:25:54 +09:00
thisgun ab204cfa59 CloudFlare 환경과 적용에 대한 코드 수정 #349 2024-10-25 11:46:50 +09:00
thisgun 3ca77a38fb 위시리스트에서 주문하기시 상품이 잘못 장바구니 담기되는 오류 수정 2024-10-23 15:23:47 +09:00
thisgun 67051c74a8 latest 함수 PHP 8 optional parameter issue 수정 2024-10-22 17:48:08 +09:00
thisgun 2a0bf12e65 버전 5.6.6 수정 2024-09-24 16:05:45 +09:00
thisgun dfa16adf31 KG이니시스 통합인증 9032 중복된 주문 에러와 회원정보 찾기 오류 수정 2024-09-24 16:03:42 +09:00
thisgun 96b30e0df6 Toss Payments - XPay 호출 도메인 변경 lgdacom.conf url 수정 #341 2024-09-04 20:03:13 +09:00
thisgun ef99a886cc 버전 5.6.5 수정 2024-09-04 12:56:35 +09:00
thisgun 20eb993757 나이스페이 주문정보 입력 오류시 결제 취소 코드 추가 및 불필요한 코드 제거 2024-09-04 12:55:05 +09:00
thisgun 3474be175d 토스페이먼츠 (구)lg XPay 테스트 에스크로 배송 url 수정 2024-09-03 18:03:21 +09:00
thisgun 532bf6f0f4 토스페이먼츠 (구)lg XPay 도메인 지원종료에 따른 결제도메인 수정 2024-09-03 17:17:55 +09:00
thisgun c4c1e50f68 Merge branch 'master' of github.com:gnuboard/gnuboard5 2024-07-18 10:28:57 +09:00
thisgun 7754e12194 토스페이먼츠 테스트 결제 url 수정 2024-07-18 10:28:26 +09:00
thisgun 287d68790f 토스페이먼츠 모바일 결제수단 키 수정 2024-07-18 10:18:57 +09:00
kagla 7d396b1749 Merge pull request #331 from gnuboard/php8.3
창고재고 없을때 '재고 부족' sound 처리하는 잘못 노출된 span 태그 제거
2024-07-18 08:24:17 +09:00
kagla d666e3467f 창고재고 없을때 '재고 부족' sound 처리하는 잘못 노출된 span 태그 제거 2024-07-18 08:18:11 +09:00
kagla d4c158cfa4 php-mysql 미설치시, 그누보드 설치 경고창에 정보 안나오는 경우 해결 2024-07-16 10:56:06 +09:00
thisgun f1af936c7d Cloudflare 환경에서 REMOTE_ADDR에 사용자 아이피 적용 2024-07-11 18:30:03 +09:00
thisgun 72d52b594c Deprecated: Optional parameter warning message 경고메시지 나오는 함수 코드 수정 2024-07-08 11:22:58 +09:00
51 changed files with 463 additions and 132 deletions

No files matched your search

+21 -3
View File
@@ -414,6 +414,14 @@ if (!isset($config['cf_cert_use_seed'])) {
ADD COLUMN `cf_cert_use_seed` TINYINT(4) NOT NULL DEFAULT '1' AFTER `cf_cert_kg_mid`; "; ADD COLUMN `cf_cert_use_seed` TINYINT(4) NOT NULL DEFAULT '1' AFTER `cf_cert_kg_mid`; ";
sql_query($sql, false); sql_query($sql, false);
} }
if (!isset($config['cf_cert_kcp_enckey'])) {
$sql = "ALTER TABLE `{$g5['config_table']}`
ADD COLUMN `cf_cert_kcp_enckey` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_cert_kcp_cd`; ";
sql_query($sql, false);
$config['cf_cert_kcp_enckey'] = '';
}
if (!$config['cf_faq_skin']) { if (!$config['cf_faq_skin']) {
$config['cf_faq_skin'] = "basic"; $config['cf_faq_skin'] = "basic";
} }
@@ -1066,6 +1074,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<input type="text" name="cf_cert_kcp_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcp_cd']); ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a> <input type="text" name="cf_cert_kcp_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcp_cd']); ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
</td> </td>
</tr> </tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_enckey">NHN KCP 가맹점 인증키</label></th>
<td class="cf_cert_service">
<?php echo help('(선택사항, 추후 NHN_KCP 상점관리자에서 인증키 발급 메뉴 오픈일정 이후부터 적용되는 내용입니다.)<br>NHN_KCP 상점관리자 > 기술관리센터 > 인증센터 > 가맹점 인증키관리 에서 인증키 발급 후에 인증키 정보를 입력') ?>
<input type="text" name="cf_cert_kcp_enckey" value="<?php echo get_sanitize_input($config['cf_cert_kcp_enckey']); ?>" id="cf_cert_kcp_enckey" class="frm_input" maxlength="100" size="40"> <a href="https://partner.kcp.co.kr" target="_blank" class="btn_frmline">NHN KCP 상점관리자</a>
</td>
</tr>
<tr> <tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th> <th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
<td class="cf_cert_service"> <td class="cf_cert_service">
@@ -1669,14 +1684,17 @@ if ($config['cf_cert_use']) {
// kcp일 때 // kcp일 때
if ($config['cf_cert_hp'] == 'kcp') { if ($config['cf_cert_hp'] == 'kcp') {
$bin_path = ((int)$config['cf_cert_use'] === 2 && !$config['cf_cert_kcp_enckey']) ? 'bin_old' : 'bin';
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if (PHP_INT_MAX == 2147483647) { // 32-bit if (PHP_INT_MAX == 2147483647) { // 32-bit
$exe = G5_KCPCERT_PATH . '/bin/ct_cli'; $exe = G5_KCPCERT_PATH . '/'.$bin_path.'/ct_cli';
} else { } else {
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_x64'; $exe = G5_KCPCERT_PATH . '/'.$bin_path.'/ct_cli_x64';
} }
} else { } else {
$exe = G5_KCPCERT_PATH . '/bin/ct_cli_exe.exe'; $exe = G5_KCPCERT_PATH . '/'.$bin_path.'/ct_cli_exe.exe';
} }
echo module_exec_check($exe, 'ct_cli'); echo module_exec_check($exe, 'ct_cli');
+2 -1
View File
@@ -23,7 +23,7 @@ check_admin_token();
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : ''; $cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
$check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret', 'cf_cert_kg_cd', 'cf_cert_kg_mid'); $check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_cert_kcp_enckey', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret', 'cf_cert_kg_cd', 'cf_cert_kg_mid');
foreach ($check_keys as $key) { foreach ($check_keys as $key) {
if (isset($_POST[$key]) && $_POST[$key]) { if (isset($_POST[$key]) && $_POST[$key]) {
@@ -289,6 +289,7 @@ $sql = " update {$g5['config_table']}
cf_cert_kg_mid = '" . trim($_POST['cf_cert_kg_mid']) . "', cf_cert_kg_mid = '" . trim($_POST['cf_cert_kg_mid']) . "',
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}', cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}', cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
cf_cert_kcp_enckey = '{$_POST['cf_cert_kcp_enckey']}',
cf_cert_limit = '{$_POST['cf_cert_limit']}', cf_cert_limit = '{$_POST['cf_cert_limit']}',
cf_cert_req = '{$_POST['cf_cert_req']}', cf_cert_req = '{$_POST['cf_cert_req']}',
cf_sms_use = '{$_POST['cf_sms_use']}', cf_sms_use = '{$_POST['cf_sms_use']}',
+2 -2
View File
@@ -1067,8 +1067,8 @@ if(!$default['de_kakaopay_cancelpwd']){
<a href="http://testadmin8.kcp.co.kr/" target="_blank" class="btn_frmline">테스트 관리자</a> <a href="http://testadmin8.kcp.co.kr/" target="_blank" class="btn_frmline">테스트 관리자</a>
</div> </div>
<div class="scf_cardtest lg_cardtest"> <div class="scf_cardtest lg_cardtest">
<a href="https://pgweb.uplus.co.kr/" target="_blank" class="btn_frmline">실결제 관리자</a> <a href="https://pgweb.tosspayments.com/" target="_blank" class="btn_frmline">실결제 관리자</a>
<a href="https://pgweb.uplus.co.kr/tmert" target="_blank" class="btn_frmline">테스트 관리자</a> <a href="https://pgweb.tosspayments.com/tmert" target="_blank" class="btn_frmline">테스트 관리자</a>
</div> </div>
<div class="scf_cardtest inicis_cardtest"> <div class="scf_cardtest inicis_cardtest">
<a href="https://iniweb.inicis.com/" target="_blank" class="btn_frmline">상점 관리자</a> <a href="https://iniweb.inicis.com/" target="_blank" class="btn_frmline">상점 관리자</a>
+1 -2
View File
@@ -159,7 +159,6 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
$it_stock_qty_st = ''; // 스타일 정의 $it_stock_qty_st = ''; // 스타일 정의
if($row['it_stock_qty'] <= $row['it_noti_qty']) { if($row['it_stock_qty'] <= $row['it_noti_qty']) {
$it_stock_qty_st = ' sit_stock_qty_alert'; $it_stock_qty_st = ' sit_stock_qty_alert';
$it_stock_qty = ''.$it_stock_qty.' !<span class="sound_only"> 재고부족 </span>';
} }
$bg = 'bg'.($i%2); $bg = 'bg'.($i%2);
@@ -171,7 +170,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php echo $row['it_id']; ?> <?php echo $row['it_id']; ?>
</td> </td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?></a></td> <td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?></a></td>
<td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo get_text($it_stock_qty); ?></td> <td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo $it_stock_qty; ?></td>
<td class="td_num"><?php echo number_format((float)$wait_qty); ?></td> <td class="td_num"><?php echo number_format((float)$wait_qty); ?></td>
<td class="td_num"><?php echo number_format((float)$temporary_qty); ?></td> <td class="td_num"><?php echo number_format((float)$temporary_qty); ?></td>
<td class="td_num"> <td class="td_num">
+2 -2
View File
@@ -510,10 +510,10 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
if ($od['od_settle_case'] != '무통장') { if ($od['od_settle_case'] != '무통장') {
switch($od['od_pg']) { switch($od['od_pg']) {
case 'lg': case 'lg':
$pg_url = 'http://pgweb.uplus.co.kr'; $pg_url = 'http://pgweb.tosspayments.com';
$pg_test = '토스페이먼츠'; $pg_test = '토스페이먼츠';
if ($default['de_card_test']) { if ($default['de_card_test']) {
$pg_url = 'http://pgweb.uplus.co.kr/tmert'; $pg_url = 'http://pgweb.tosspayments.com/tmert';
$pg_test .= ' 테스트 '; $pg_test .= ' 테스트 ';
} }
break; break;
+3 -3
View File
@@ -49,7 +49,7 @@ if ($csv == 'csv')
$to_date = date_conv($to_date); $to_date = date_conv($to_date);
$sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type $sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type
FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
where a.od_id = b.od_id "; where a.od_id = b.od_id ";
if ($case == 1) // 출력기간 if ($case == 1) // 출력기간
@@ -65,7 +65,7 @@ if ($csv == 'csv')
alert("출력할 내역이 없습니다."); alert("출력할 내역이 없습니다.");
//header('Content-Type: text/x-csv'); //header('Content-Type: text/x-csv');
header("Content-charset=utf-8"); header("Content-Type: text/csv; charset=utf-8");
header('Content-Type: doesn/matter'); header('Content-Type: doesn/matter');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="orderlist-' . date("ymd", time()) . '.csv"'); header('Content-Disposition: attachment; filename="orderlist-' . date("ymd", time()) . '.csv"');
@@ -153,7 +153,7 @@ if ($csv == 'xls')
$fr_date = date_conv($fr_date); $fr_date = date_conv($fr_date);
$to_date = date_conv($to_date); $to_date = date_conv($to_date);
$sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type $sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type
FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
where a.od_id = b.od_id "; where a.od_id = b.od_id ";
if ($case == 1) // 출력기간 if ($case == 1) // 출력기간
+6
View File
@@ -31,6 +31,9 @@ $wr_subject = '';
if (isset($_POST['wr_subject'])) { if (isset($_POST['wr_subject'])) {
$wr_subject = substr(trim($_POST['wr_subject']),0,255); $wr_subject = substr(trim($_POST['wr_subject']),0,255);
$wr_subject = preg_replace("#[\\\]+$#", "", $wr_subject); $wr_subject = preg_replace("#[\\\]+$#", "", $wr_subject);
if (function_exists('normalize_utf8_string')) {
$wr_subject = normalize_utf8_string($wr_subject);
}
} }
if ($wr_subject == '') { if ($wr_subject == '') {
$msg[] = '<strong>제목</strong>을 입력하세요.'; $msg[] = '<strong>제목</strong>을 입력하세요.';
@@ -40,6 +43,9 @@ $wr_content = '';
if (isset($_POST['wr_content'])) { if (isset($_POST['wr_content'])) {
$wr_content = substr(trim($_POST['wr_content']),0,65536); $wr_content = substr(trim($_POST['wr_content']),0,65536);
$wr_content = preg_replace("#[\\\]+$#", "", $wr_content); $wr_content = preg_replace("#[\\\]+$#", "", $wr_content);
if (function_exists('normalize_utf8_string')) {
$wr_content = normalize_utf8_string($wr_content);
}
} }
if ($wr_content == '') { if ($wr_content == '') {
$msg[] = '<strong>내용</strong>을 입력하세요.'; $msg[] = '<strong>내용</strong>을 입력하세요.';
+110
View File
@@ -0,0 +1,110 @@
<?php
// CloudFlare를 사용시, 사용자 환경에 맞는 $_SERVER['REMOTE_ADDR']과 $_SERVER['HTTPS'] 사용 여부를 수정합니다.
class G5CloudflareRequestHandler {
public static function check_cloudflare_ips($user_ip){
// 클라우드플레어 IP, https://www.cloudflare.com/ips
$cloudflare_ips = array(
// IPv4
'173.245.48.0/20',
'103.21.244.0/22',
'103.22.200.0/22',
'103.31.4.0/22',
'141.101.64.0/18',
'108.162.192.0/18',
'190.93.240.0/20',
'188.114.96.0/20',
'197.234.240.0/22',
'198.41.128.0/17',
'162.158.0.0/15',
'104.16.0.0/12',
'104.24.0.0/14',
'172.64.0.0/13',
'131.0.72.0/22',
// IPv6
'2400:cb00::/32',
'2606:4700::/32',
'2803:f800::/32',
'2405:b500::/32',
'2405:8100::/32',
'2a06:98c0::/29',
'2c0f:f248::/32',
);
// 사용자 IP가 Cloudflare IP 대역 범위에 있는지 확인
$is_cloudflare_ip = false;
foreach ($cloudflare_ips as $cidr) {
if (self::ip_in_range($user_ip, $cidr)) {
$is_cloudflare_ip = true;
break;
}
}
return $is_cloudflare_ip;
}
// IP 주소가 CIDR 범위 내에 있는지 확인하는 함수 (IPv4, IPv6 모두 가능)
public static function ip_in_range($ip, $range) {
// IPv4와 IPv6를 구분
if (strpos($range, ':') === false && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $ip)) {
// IPv4 처리
return self::ipv4_in_range($ip, $range);
} elseif (strpos($range, ':') !== false && strpos($ip, ':') !== false) {
// IPv6 처리
return self::ipv6_in_range($ip, $range);
}
return false;
}
// IPv4 CIDR 범위 검사
public static function ipv4_in_range($ip, $range) {
list($range, $netmask) = explode('/', $range, 2);
$range_decimal = ip2long($range);
$ip_decimal = ip2long($ip);
$wildcard_decimal = pow(2, (32 - $netmask)) - 1;
$netmask_decimal = ~$wildcard_decimal;
return (($ip_decimal & $netmask_decimal) == ($range_decimal & $netmask_decimal));
}
// IPv6 CIDR 범위 검사
public static function ipv6_in_range($ip, $range) {
list($range_ip, $netmask) = explode('/', $range, 2);
$netmask = (int) $netmask;
$ip_bin = @inet_pton($ip);
$range_bin = @inet_pton($range_ip);
// IPv6 주소는 128비트이므로, 비트마스크를 적용
$unpacked = unpack('A16', $ip_bin);
$ip_bits = $unpacked[1];
$unpacked2 = unpack('A16', $range_bin);
$range_bits = $unpacked2[1];
for ($i = 0; $i < (int)($netmask / 8); $i++) {
if ($ip_bits[$i] !== $range_bits[$i]) {
return false;
}
}
$remainder = $netmask % 8;
if ($remainder) {
$mask = 0xFF << (8 - $remainder);
return (ord($ip_bits[$i]) & $mask) === (ord($range_bits[$i]) & $mask);
}
return true;
}
}
if ($_SERVER['HTTP_CF_CONNECTING_IP'] && G5CloudflareRequestHandler::check_cloudflare_ips($_SERVER['REMOTE_ADDR'])) {
$_SERVER['REMOTE_ADDR'] = preg_replace('/[^0-9a-fA-F:.]/', '', $_SERVER['HTTP_CF_CONNECTING_IP']);
// Cloudflare 환경을 고려한 https 사용여부
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === "https") {
$_SERVER['HTTPS'] = 'on';
} elseif (isset($_SERVER['HTTP_CF_VISITOR']) && stripos($_SERVER['HTTP_CF_VISITOR'], 'https') !== false) {
$_SERVER['HTTPS'] = 'on';
}
}
+5 -6
View File
@@ -29,6 +29,10 @@ for ($i=0; $i<$ext_cnt; $i++) {
} }
//========================================================================================================================== //==========================================================================================================================
// Cloudflare 사용시 REMOTE_ADDR 에 사용자 IP 적용과 https 사용 여부
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
include_once('cloudflare.check.php'); // cloudflare 의 ip 대역인지 체크
}
function g5_path() function g5_path()
{ {
@@ -58,15 +62,10 @@ include_once($g5_path['path'].'/config.php'); // 설정 파일
unset($g5_path); unset($g5_path);
// IIS 에서 SERVER_ADDR 서버변수가 없다면 // IIS 에서 SERVER_ADDR 서버변수가 없다면
if(! isset($_SERVER['SERVER_ADDR'])) { if (!isset($_SERVER['SERVER_ADDR'])) {
$_SERVER['SERVER_ADDR'] = isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : ''; $_SERVER['SERVER_ADDR'] = isset($_SERVER['LOCAL_ADDR']) ? $_SERVER['LOCAL_ADDR'] : '';
} }
// Cloudflare 환경을 고려한 https 사용여부
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === "https") {
$_SERVER['HTTPS'] = 'on';
}
// multi-dimensional array에 사용자지정 함수적용 // multi-dimensional array에 사용자지정 함수적용
function array_map_deep($fn, $array) function array_map_deep($fn, $array)
{ {
+1
View File
@@ -1,5 +1,6 @@
<?php <?php
$g5_path['path'] = '..'; $g5_path['path'] = '..';
include_once('install_common.php');
include_once('../config.php'); include_once('../config.php');
include_once('./install.function.php'); // 인스톨 과정 함수 모음 include_once('./install.function.php'); // 인스톨 과정 함수 모음
include_once('../lib/common.lib.php'); // 공통 라이브러리 include_once('../lib/common.lib.php'); // 공통 라이브러리
+2 -1
View File
@@ -295,6 +295,7 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_cert_use_seed` tinyint(4) NOT NULL DEFAULT '1', `cf_cert_use_seed` tinyint(4) NOT NULL DEFAULT '1',
`cf_cert_kcb_cd` varchar(255) NOT NULL DEFAULT '', `cf_cert_kcb_cd` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kcp_cd` varchar(255) NOT NULL DEFAULT '', `cf_cert_kcp_cd` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kcp_enckey` varchar(100) NOT NULL DEFAULT '',
`cf_lg_mid` varchar(100) NOT NULL DEFAULT '', `cf_lg_mid` varchar(100) NOT NULL DEFAULT '',
`cf_lg_mert_key` varchar(100) NOT NULL DEFAULT '', `cf_lg_mert_key` varchar(100) NOT NULL DEFAULT '',
`cf_cert_limit` int(11) NOT NULL DEFAULT '0', `cf_cert_limit` int(11) NOT NULL DEFAULT '0',
@@ -909,7 +910,7 @@ CREATE TABLE IF NOT EXISTS `g5_member_social_profiles` (
`description` varchar(255) NOT NULL DEFAULT '', `description` varchar(255) NOT NULL DEFAULT '',
`mp_register_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `mp_register_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`mp_latest_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `mp_latest_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
UNIQUE KEY `mp_no` (`mp_no`), PRIMARY KEY (`mp_no`),
KEY `mb_id` (`mb_id`), KEY `mb_id` (`mb_id`),
KEY `provider` (`provider`) KEY `provider` (`provider`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+1
View File
@@ -2,6 +2,7 @@
@header('Content-Type: text/html; charset=utf-8'); @header('Content-Type: text/html; charset=utf-8');
@header('X-Robots-Tag: noindex'); @header('X-Robots-Tag: noindex');
$g5_path['path'] = '..'; $g5_path['path'] = '..';
include_once('install_common.php');
include_once ('../config.php'); include_once ('../config.php');
$title = G5_VERSION." 라이센스 확인 1/3"; $title = G5_VERSION." 라이센스 확인 1/3";
include_once ('./install.inc.php'); include_once ('./install.inc.php');
+4
View File
@@ -0,0 +1,4 @@
<?php
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
include_once('../cloudflare.check.php'); // cloudflare 의 ip 대역인지 체크
}
+1
View File
@@ -9,6 +9,7 @@ header('Pragma: no-cache'); // HTTP/1.0
@header('X-Robots-Tag: noindex'); @header('X-Robots-Tag: noindex');
$g5_path['path'] = '..'; $g5_path['path'] = '..';
include_once('install_common.php');
include_once ('../config.php'); include_once ('../config.php');
$title = G5_VERSION." 초기환경설정 2/3"; $title = G5_VERSION." 초기환경설정 2/3";
include_once ('./install.inc.php'); include_once ('./install.inc.php');
+1
View File
@@ -10,6 +10,7 @@ header('Pragma: no-cache'); // HTTP/1.0
@header('X-Robots-Tag: noindex'); @header('X-Robots-Tag: noindex');
$g5_path['path'] = '..'; $g5_path['path'] = '..';
include_once('install_common.php');
include_once('../config.php'); include_once('../config.php');
include_once('../lib/common.lib.php'); include_once('../lib/common.lib.php');
include_once('./install.function.php'); // 인스톨 과정 함수 모음 include_once('./install.function.php'); // 인스톨 과정 함수 모음
+1 -1
View File
@@ -134,7 +134,7 @@ function no_comma(data)
function del(href) function del(href)
{ {
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) { if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
document.location.href = href; window.location.href = href;
} }
} }
+23 -2
View File
@@ -1683,7 +1683,10 @@ function sql_connect($host, $user, $pass, $db=G5_MYSQL_DB)
die('Connect Error: '.mysqli_connect_error()); die('Connect Error: '.mysqli_connect_error());
} }
} else { } else {
$link = mysql_connect($host, $user, $pass); if (!function_exists('mysql_connect')) {
die('MySQL이 설치되지 않아 mysql_connect 함수를 사용할 수 없습니다.');
}
$link = mysql_connect($host, $user, $pass) or die('MySQL Host, User, Password 정보에 오류가 있습니다.');
} }
return $link; return $link;
@@ -2129,7 +2132,7 @@ function time_select($time, $name="")
preg_match("/([0-9]{2}):([0-9]{2}):([0-9]{2})/", $time, $m); preg_match("/([0-9]{2}):([0-9]{2}):([0-9]{2})/", $time, $m);
// 시 // 시
$s .= "<select name='{$name}_h'>"; $s = "<select name='{$name}_h'>";
for ($i=0; $i<=23; $i++) { for ($i=0; $i<=23; $i++) {
$s .= "<option value='$i'"; $s .= "<option value='$i'";
if ($i == $m['0']) { if ($i == $m['0']) {
@@ -2277,6 +2280,24 @@ function _callback_bad_tag_convert($matches){
return "<div class=\"embedx\">보안문제로 인하여 관리자 아이디로는 embed 또는 object 태그를 볼 수 없습니다. 확인하시려면 관리권한이 없는 다른 아이디로 접속하세요.</div>"; return "<div class=\"embedx\">보안문제로 인하여 관리자 아이디로는 embed 또는 object 태그를 볼 수 없습니다. 확인하시려면 관리권한이 없는 다른 아이디로 접속하세요.</div>";
} }
function normalize_utf8_string($string) {
// utf8mb4 환경과 mb_ord 함수가 지원되지 않는 환경에서는 제외한다.
if (G5_DB_CHARSET === 'utf8mb4' || !function_exists('mb_ord')) {
return $string;
}
// Unicode 특수 문자를 일반 문자로 변환
$normalized = preg_replace_callback('/[\x{1D400}-\x{1D7FF}]/u', '_callback_normalizeString', $string);
return $normalized;
}
function _callback_normalizeString($matches){
$charCode = mb_ord($matches[0], 'UTF-8');
// 변환 테이블에서 일반 문자로 매핑
return chr(($charCode - 0x1D400) % 26 + ord('A'));
}
// 토큰 생성 // 토큰 생성
function _token() function _token()
{ {
+1 -1
View File
@@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit;
// 최신글 추출 // 최신글 추출
// $cache_time 캐시 갱신시간 // $cache_time 캐시 갱신시간
function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=1, $options='') function latest($skin_dir='', $bo_table='', $rows=10, $subject_len=40, $cache_time=1, $options='')
{ {
global $g5; global $g5;
+1 -1
View File
@@ -2747,7 +2747,7 @@ function is_inicis_order_pay($type){
return false; return false;
} }
function get_item_images_info($it, $size=array(), $image_width, $image_height){ function get_item_images_info($it, $size=array(), $image_width=0, $image_height=0){
if( !(is_array($it) && $it) ) return array(); if( !(is_array($it) && $it) ) return array();
$images = array(); $images = array();
+4 -2
View File
@@ -80,6 +80,8 @@ $payReqMap['LGD_HASHDATA'] = $LGD_HASHDATA; // MD5 해쉬
$payReqMap['LGD_RETURNURL'] = $LGD_RETURNURL; // 응답수신페이지 $payReqMap['LGD_RETURNURL'] = $LGD_RETURNURL; // 응답수신페이지
$payReqMap['LGD_VERSION'] = "PHP_SmartXPay_1.0"; // 버전정보 (삭제하지 마세요) $payReqMap['LGD_VERSION'] = "PHP_SmartXPay_1.0"; // 버전정보 (삭제하지 마세요)
$payReqMap['LGD_CUSTOM_FIRSTPAY'] = $LGD_CUSTOM_FIRSTPAY; // 디폴트 결제수단 $payReqMap['LGD_CUSTOM_FIRSTPAY'] = $LGD_CUSTOM_FIRSTPAY; // 디폴트 결제수단
// 2024년 7월에 모바일 결제수단 키가 LGD_CUSTOM_USABLEPAY 키로 쓰이는 것을 확인함
$payReqMap['LGD_CUSTOM_USABLEPAY'] = $LGD_CUSTOM_FIRSTPAY; // 디폴트 결제수단
$payReqMap['LGD_CUSTOM_SWITCHINGTYPE'] = "SUBMIT"; // 신용카드 카드사 인증 페이지 연동 방식 $payReqMap['LGD_CUSTOM_SWITCHINGTYPE'] = "SUBMIT"; // 신용카드 카드사 인증 페이지 연동 방식
$payReqMap['LGD_ENCODING'] = "UTF-8"; $payReqMap['LGD_ENCODING'] = "UTF-8";
$payReqMap['LGD_ENCODING_NOTEURL'] = "UTF-8"; $payReqMap['LGD_ENCODING_NOTEURL'] = "UTF-8";
@@ -137,9 +139,9 @@ include_once(G5_PATH.'/head.sub.php');
?> ?>
<?php if ($default['de_card_test']) { // 테스트 결제시 ?> <?php if ($default['de_card_test']) { // 테스트 결제시 ?>
<script language="javascript" src="https://pretest.uplus.co.kr:9443/xpay/js/xpay_crossplatform.js" type="text/javascript"></script> <script language="javascript" src="https://js.tosspayments.com/xpay_crossplatform/sandbox/v1" type="text/javascript"></script>
<?php } else { //실 결제시 ?> <?php } else { //실 결제시 ?>
<script language="javascript" src="//xpay.uplus.co.kr/xpay/js/xpay_crossplatform.js" type="text/javascript"></script> <script language="javascript" src="https://xpay.tosspayments.com/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
<?php } ?> <?php } ?>
<script type="text/javascript"> <script type="text/javascript">
-2
View File
@@ -4,8 +4,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 나이스페이 공통 설정 // 나이스페이 공통 설정
require_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php'); require_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
if (function_exists('add_log')) add_log($_POST);
/* /*
**************************************************************************************** ****************************************************************************************
* <Authentication Result Parameter> * <Authentication Result Parameter>
@@ -2,8 +2,6 @@
include_once('./_common.php'); include_once('./_common.php');
include_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php'); include_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
if (function_exists('add_log')) add_log($_POST);
$authResultCode = isset($_POST['AuthResultCode']) ? clean_xss_tags($_POST['AuthResultCode']) : ''; // authentication result code 0000:success $authResultCode = isset($_POST['AuthResultCode']) ? clean_xss_tags($_POST['AuthResultCode']) : ''; // authentication result code 0000:success
$authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthResultMsg']) : ''; // authentication result message $authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthResultMsg']) : ''; // authentication result message
$mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id $mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id
+8
View File
@@ -698,6 +698,10 @@ if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_
case 'inicis': case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break; break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
case 'KAKAOPAY': case 'KAKAOPAY':
$_REQUEST['TID'] = $tno; $_REQUEST['TID'] = $tno;
$_REQUEST['Amt'] = $amount; $_REQUEST['Amt'] = $amount;
@@ -756,6 +760,10 @@ if(!$result) {
case 'inicis': case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break; break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
case 'KAKAOPAY': case 'KAKAOPAY':
$_REQUEST['TID'] = $tno; $_REQUEST['TID'] = $tno;
$_REQUEST['Amt'] = $amount; $_REQUEST['Amt'] = $amount;
+67 -20
View File
@@ -7,7 +7,7 @@
* primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS * primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS
* FILE, changes will be overwritten the next time the script is run. * FILE, changes will be overwritten the next time the script is run.
* *
* @version 4.14.0 * @version 4.15.0
* *
* @warning * @warning
* You must *not* include any other HTML Purifier files before this file, * You must *not* include any other HTML Purifier files before this file,
@@ -39,7 +39,7 @@
*/ */
/* /*
HTML Purifier 4.14.0 - Standards Compliant HTML Filtering HTML Purifier 4.15.0 - Standards Compliant HTML Filtering
Copyright (C) 2006-2008 Edward Z. Yang Copyright (C) 2006-2008 Edward Z. Yang
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
@@ -78,12 +78,12 @@ class HTMLPurifier
* Version of HTML Purifier. * Version of HTML Purifier.
* @type string * @type string
*/ */
public $version = '4.14.0'; public $version = '4.15.0';
/** /**
* Constant with version of HTML Purifier. * Constant with version of HTML Purifier.
*/ */
const VERSION = '4.14.0'; const VERSION = '4.15.0';
/** /**
* Global configuration object. * Global configuration object.
@@ -786,6 +786,7 @@ class HTMLPurifier_AttrTypes
$this->info['IAlign'] = self::makeEnum('top,middle,bottom,left,right'); $this->info['IAlign'] = self::makeEnum('top,middle,bottom,left,right');
$this->info['LAlign'] = self::makeEnum('top,bottom,left,right'); $this->info['LAlign'] = self::makeEnum('top,bottom,left,right');
$this->info['FrameTarget'] = new HTMLPurifier_AttrDef_HTML_FrameTarget(); $this->info['FrameTarget'] = new HTMLPurifier_AttrDef_HTML_FrameTarget();
$this->info['ContentEditable'] = new HTMLPurifier_AttrDef_HTML_ContentEditable();
// unimplemented aliases // unimplemented aliases
$this->info['ContentType'] = new HTMLPurifier_AttrDef_Text(); $this->info['ContentType'] = new HTMLPurifier_AttrDef_Text();
@@ -1827,7 +1828,7 @@ class HTMLPurifier_Config
* HTML Purifier's version * HTML Purifier's version
* @type string * @type string
*/ */
public $version = '4.14.0'; public $version = '4.15.0';
/** /**
* Whether or not to automatically finalize * Whether or not to automatically finalize
@@ -4240,8 +4241,8 @@ class HTMLPurifier_Encoder
// characters to their true byte-wise ASCII/UTF-8 equivalents. // characters to their true byte-wise ASCII/UTF-8 equivalents.
$str = strtr($str, self::testEncodingSupportsASCII($encoding)); $str = strtr($str, self::testEncodingSupportsASCII($encoding));
return $str; return $str;
} elseif ($encoding === 'iso-8859-1') { } elseif ($encoding === 'iso-8859-1' && function_exists('mb_convert_encoding')) {
$str = utf8_encode($str); $str = mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1');
return $str; return $str;
} }
$bug = HTMLPurifier_Encoder::testIconvTruncateBug(); $bug = HTMLPurifier_Encoder::testIconvTruncateBug();
@@ -4292,8 +4293,8 @@ class HTMLPurifier_Encoder
// Normal stuff // Normal stuff
$str = self::iconv('utf-8', $encoding . '//IGNORE', $str); $str = self::iconv('utf-8', $encoding . '//IGNORE', $str);
return $str; return $str;
} elseif ($encoding === 'iso-8859-1') { } elseif ($encoding === 'iso-8859-1' && function_exists('mb_convert_encoding')) {
$str = utf8_decode($str); $str = mb_convert_encoding($str, 'ISO-8859-1', 'UTF-8');
return $str; return $str;
} }
trigger_error('Encoding not supported', E_USER_ERROR); trigger_error('Encoding not supported', E_USER_ERROR);
@@ -7688,6 +7689,11 @@ class HTMLPurifier_Lexer
*/ */
public $tracksLineNumbers = false; public $tracksLineNumbers = false;
/**
* @type HTMLPurifier_EntityParser
*/
private $_entity_parser;
// -- STATIC ---------------------------------------------------------- // -- STATIC ----------------------------------------------------------
/** /**
@@ -8336,8 +8342,6 @@ class HTMLPurifier_PropertyListIterator extends FilterIterator
/** /**
* @return bool * @return bool
*
* {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] #[\ReturnTypeWillChange]
public function accept() public function accept()
@@ -8457,8 +8461,6 @@ class HTMLPurifier_StringHash extends ArrayObject
* Retrieves a value, and logs the access. * Retrieves a value, and logs the access.
* @param mixed $index * @param mixed $index
* @return mixed * @return mixed
*
* {@inheritdoc}
*/ */
#[\ReturnTypeWillChange] #[\ReturnTypeWillChange]
public function offsetGet($index) public function offsetGet($index)
@@ -12886,6 +12888,23 @@ class HTMLPurifier_AttrDef_HTML_Color extends HTMLPurifier_AttrDef
class HTMLPurifier_AttrDef_HTML_ContentEditable extends HTMLPurifier_AttrDef
{
public function validate($string, $config, $context)
{
$allowed = array('false');
if ($config->get('HTML.Trusted')) {
$allowed = array('', 'true', 'false');
}
$enum = new HTMLPurifier_AttrDef_Enum($allowed);
return $enum->validate($string, $config, $context);
}
}
/** /**
* Special-case enum attribute definition that lazy loads allowed frame targets * Special-case enum attribute definition that lazy loads allowed frame targets
*/ */
@@ -14154,6 +14173,11 @@ class HTMLPurifier_AttrTransform_Name extends HTMLPurifier_AttrTransform
class HTMLPurifier_AttrTransform_NameSync extends HTMLPurifier_AttrTransform class HTMLPurifier_AttrTransform_NameSync extends HTMLPurifier_AttrTransform
{ {
/**
* @type HTMLPurifier_AttrDef_HTML_ID
*/
public $idDef;
public function __construct() public function __construct()
{ {
$this->idDef = new HTMLPurifier_AttrDef_HTML_ID(); $this->idDef = new HTMLPurifier_AttrDef_HTML_ID();
@@ -14320,6 +14344,11 @@ class HTMLPurifier_AttrTransform_SafeParam extends HTMLPurifier_AttrTransform
*/ */
private $uri; private $uri;
/**
* @type HTMLPurifier_AttrDef_Enum
*/
public $wmode;
public function __construct() public function __construct()
{ {
$this->uri = new HTMLPurifier_AttrDef_URI(true); // embedded $this->uri = new HTMLPurifier_AttrDef_URI(true); // embedded
@@ -14782,6 +14811,8 @@ class HTMLPurifier_ChildDef_List extends HTMLPurifier_ChildDef
// XXX: This whole business with 'wrap' is all a bit unsatisfactory // XXX: This whole business with 'wrap' is all a bit unsatisfactory
public $elements = array('li' => true, 'ul' => true, 'ol' => true); public $elements = array('li' => true, 'ul' => true, 'ol' => true);
public $whitespace;
/** /**
* @param array $children * @param array $children
* @param HTMLPurifier_Config $config * @param HTMLPurifier_Config $config
@@ -16083,6 +16114,7 @@ class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule
'class' => 'Class', 'class' => 'Class',
'id' => 'ID', 'id' => 'ID',
'title' => 'CDATA', 'title' => 'CDATA',
'contenteditable' => 'ContentEditable',
), ),
'Lang' => array(), 'Lang' => array(),
'I18N' => array( 'I18N' => array(
@@ -18775,6 +18807,16 @@ class HTMLPurifier_Injector_RemoveSpansWithoutAttributes extends HTMLPurifier_In
*/ */
private $context; private $context;
/**
* @type SplObjectStorage
*/
private $markForDeletion;
public function __construct()
{
$this->markForDeletion = new SplObjectStorage();
}
public function prepare($config, $context) public function prepare($config, $context)
{ {
$this->attrValidator = new HTMLPurifier_AttrValidator(); $this->attrValidator = new HTMLPurifier_AttrValidator();
@@ -18808,7 +18850,7 @@ class HTMLPurifier_Injector_RemoveSpansWithoutAttributes extends HTMLPurifier_In
if ($current instanceof HTMLPurifier_Token_End && $current->name === 'span') { if ($current instanceof HTMLPurifier_Token_End && $current->name === 'span') {
// Mark closing span tag for deletion // Mark closing span tag for deletion
$current->markForDeletion = true; $this->markForDeletion->attach($current);
// Delete open span tag // Delete open span tag
$token = false; $token = false;
} }
@@ -18819,7 +18861,8 @@ class HTMLPurifier_Injector_RemoveSpansWithoutAttributes extends HTMLPurifier_In
*/ */
public function handleEnd(&$token) public function handleEnd(&$token)
{ {
if ($token->markForDeletion) { if ($this->markForDeletion->contains($token)) {
$this->markForDeletion->detach($token);
$token = false; $token = false;
} }
} }
@@ -21643,7 +21686,7 @@ class HTMLPurifier_URIFilter_HostBlacklist extends HTMLPurifier_URIFilter
public function filter(&$uri, $config, $context) public function filter(&$uri, $config, $context)
{ {
foreach ($this->blacklist as $blacklisted_host_fragment) { foreach ($this->blacklist as $blacklisted_host_fragment) {
if (strpos($uri->host, $blacklisted_host_fragment) !== false) { if ($uri->host !== null && strpos($uri->host, $blacklisted_host_fragment) !== false) {
return false; return false;
} }
} }
@@ -21914,11 +21957,15 @@ class HTMLPurifier_URIFilter_Munge extends HTMLPurifier_URIFilter
$string = $uri->toString(); $string = $uri->toString();
// always available // always available
$this->replace['%s'] = $string; $this->replace['%s'] = $string;
$this->replace['%r'] = $context->get('EmbeddedURI', true); $e = $context->get('EmbeddedURI', true);
$token = $context->get('CurrentToken', true); $this->replace['%r'] = $e ? $e : '';
$e = $context->get('CurrentToken', true);
$token = $e ? $e: '';
$this->replace['%n'] = $token ? $token->name : ''; $this->replace['%n'] = $token ? $token->name : '';
$this->replace['%m'] = $context->get('CurrentAttr', true); $e = $context->get('CurrentAttr', true);
$this->replace['%p'] = $context->get('CurrentCSSProperty', true); $this->replace['%m'] = $e ? $e : '';
$e = $context->get('CurrentCSSProperty', true);
$this->replace['%p'] = $e ? $e : '';
// not always available // not always available
if ($this->secretKey) { if ($this->secretKey) {
$this->replace['%t'] = hash_hmac("sha256", $string, $this->secretKey); $this->replace['%t'] = hash_hmac("sha256", $string, $this->secretKey);
+12
View File
@@ -1,8 +1,12 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
require_once (dirname(__FILE__) .'/libs/KISA_SEED_CBC.php');
require_once (dirname(__FILE__) .'/libs/INILib.php');
$txId = isset($_POST['txId']) ? clean_xss_tags($_POST['txId'], 1, 1) : ''; $txId = isset($_POST['txId']) ? clean_xss_tags($_POST['txId'], 1, 1) : '';
$mid = substr($txId, 6, 10); $mid = substr($txId, 6, 10);
$SEEDKEY = isset($_POST['token']) ? clean_xss_tags($_POST['token'], 1, 1) : '';
$SEEDIV = 'SASHOSTSIRIAS000';
if ($txId && isset($_POST["resultCode"]) && $_POST["resultCode"] === "0000") { if ($txId && isset($_POST["resultCode"]) && $_POST["resultCode"] === "0000") {
@@ -41,6 +45,14 @@ if ($txId && isset($_POST["resultCode"]) && $_POST["resultCode"] === "0000") {
$birth_day = $res_data['userBirthday']; // 생년월일 $birth_day = $res_data['userBirthday']; // 생년월일
$ci = $res_data['userCi']; // CI $ci = $res_data['userCi']; // CI
if (defined('KGINICIS_USE_CERT_SEED') && KGINICIS_USE_CERT_SEED) {
// 개인정보SEED 암호화 된것을 복호화 합니다.
$user_name = decrypt_SEED($user_name, $SEEDKEY, $SEEDIV);
$phone_no = decrypt_SEED($phone_no, $SEEDKEY, $SEEDIV);
$birth_day = decrypt_SEED($birth_day, $SEEDKEY, $SEEDIV);
$ci = decrypt_SEED($ci, $SEEDKEY, $SEEDIV);
}
@insert_cert_history($member['mb_id'], 'inicis', $cert_type); // 인증성공 시 내역 기록 @insert_cert_history($member['mb_id'], 'inicis', $cert_type); // 인증성공 시 내역 기록
if(!$phone_no) if(!$phone_no)
+3 -2
View File
@@ -9,13 +9,14 @@ if(empty($max_cr_id)) $max_cr_id = 0;
if($config['cf_cert_use'] == 2) { // 실서비스 일때 if($config['cf_cert_use'] == 2) { // 실서비스 일때
$mid = 'SRA'.$config['cf_cert_kg_mid']; // 부여받은 MID(상점ID) 입력(영업담당자 문의) $mid = 'SRA'.$config['cf_cert_kg_mid']; // 부여받은 MID(상점ID) 입력(영업담당자 문의)
$apiKey = $config['cf_cert_kg_cd']; // 부여받은 MID 에 대한 apiKey $apiKey = $config['cf_cert_kg_cd']; // 부여받은 MID 에 대한 apiKey
$mTxId ='SIR_'.$max_cr_id; $mTxId ='SIR_'.substr($max_cr_id.'_'.round(microtime(true) * 1000), 0, 16);
certify_count_check($member['mb_id'], 'simple'); // 금일 인증시도 횟수 체크 certify_count_check($member['mb_id'], 'simple'); // 금일 인증시도 횟수 체크
} else { // 테스트 일때 } else { // 테스트 일때
$mid = "SRAiasTest"; $mid = "SRAiasTest";
$apiKey = "43700dfd4c795fe9550853aef3b6aaf1"; $apiKey = "43700dfd4c795fe9550853aef3b6aaf1";
$mTxId ='SIR_'.$max_cr_id; $mTxId ='SIR_'.substr($max_cr_id.'_'.round(microtime(true) * 1000), 0, 16);
} }
$reqSvcCd ='01'; // 요청구분코드 ["01":간편인증, "02":전자서명] $reqSvcCd ='01'; // 요청구분코드 ["01":간편인증, "02":전자서명]
$reservedMsg = (defined('KGINICIS_USE_CERT_SEED') && KGINICIS_USE_CERT_SEED) ? 'isUseToken=Y' : ''; // 결과조회 응답시 개인정보SEED 암호화 처리 요청 $reservedMsg = (defined('KGINICIS_USE_CERT_SEED') && KGINICIS_USE_CERT_SEED) ? 'isUseToken=Y' : ''; // 결과조회 응답시 개인정보SEED 암호화 처리 요청
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+18 -5
View File
@@ -68,6 +68,11 @@ for($i=0; $i<count($key); $i++)
$enc_cert_data = f_get_parm_str ( $valParam ); $enc_cert_data = f_get_parm_str ( $valParam );
} }
if ( $nmParam == "enc_cert_data2" )
{
$enc_cert_data2 = f_get_parm_str ( $valParam );
}
if ( $nmParam == "dn_hash" ) if ( $nmParam == "dn_hash" )
{ {
$dn_hash = f_get_parm_str ( $valParam ); $dn_hash = f_get_parm_str ( $valParam );
@@ -98,16 +103,24 @@ if( $cert_enc_use == "Y" )
// 해당 데이터의 위변조를 방지합니다 // 해당 데이터의 위변조를 방지합니다
$veri_str = $site_cd.$ordr_idxx.$cert_no; // 사이트 코드 + 주문번호 + 인증거래번호 $veri_str = $site_cd.$ordr_idxx.$cert_no; // 사이트 코드 + 주문번호 + 인증거래번호
if ( $ct_cert->check_valid_hash ( $home_dir , $dn_hash , $veri_str ) != "1" ) $enc_cert_real_data = $enc_cert_data2;
$bin_path = 'bin';
if ((int)$config['cf_cert_use'] === 2 && !$config['cf_cert_kcp_enckey']) {
$bin_path = 'bin_old';
$enc_cert_real_data = $enc_cert_data;
}
if ( $ct_cert->check_valid_hash ( $home_dir , $kcp_enc_key, $dn_hash , $veri_str ) != "1" )
{ {
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
// 검증 실패시 처리 영역 // 검증 실패시 처리 영역
if(PHP_INT_MAX == 2147483647) // 32-bit if(PHP_INT_MAX == 2147483647) // 32-bit
$bin_exe = '/bin/ct_cli'; $bin_exe = '/'.$bin_path.'/ct_cli';
else else
$bin_exe = '/bin/ct_cli_x64'; $bin_exe = '/'.$bin_path.'/ct_cli_x64';
} else { } else {
$bin_exe = '/bin/ct_cli_exe.exe'; $bin_exe = '/'.$bin_path.'/ct_cli_exe.exe';
} }
echo "dn_hash 변조 위험있음 (".G5_KCPCERT_PATH.$bin_exe." 파일에 실행권한이 있는지 확인하세요.)"; echo "dn_hash 변조 위험있음 (".G5_KCPCERT_PATH.$bin_exe." 파일에 실행권한이 있는지 확인하세요.)";
@@ -122,7 +135,7 @@ if( $cert_enc_use == "Y" )
// site_cd 와 cert_no 를 가지고 복화화 하는 함수 입니다. // site_cd 와 cert_no 를 가지고 복화화 하는 함수 입니다.
// 정상적으로 복호화 된경우에만 인증데이터를 가져올수 있습니다. // 정상적으로 복호화 된경우에만 인증데이터를 가져올수 있습니다.
$opt = "1" ; // 복호화 인코딩 옵션 ( UTF - 8 사용시 "1" ) $opt = "1" ; // 복호화 인코딩 옵션 ( UTF - 8 사용시 "1" )
$ct_cert->decrypt_enc_cert( $home_dir , $site_cd , $cert_no , $enc_cert_data , $opt ); $ct_cert->decrypt_enc_cert( $home_dir , $kcp_enc_key, $site_cd , $cert_no , $enc_cert_real_data , $opt );
$comm_id = $ct_cert->mf_get_key_value("comm_id" ); // 이동통신사 코드 $comm_id = $ct_cert->mf_get_key_value("comm_id" ); // 이동통신사 코드
$phone_no = $ct_cert->mf_get_key_value("phone_no" ); // 전화번호 $phone_no = $ct_cert->mf_get_key_value("phone_no" ); // 전화번호
+3
View File
@@ -14,12 +14,15 @@ $web_siteid = '';
if ($config['cf_cert_use'] == 2) { // 실서비스 if ($config['cf_cert_use'] == 2) { // 실서비스
$site_cd = 'SM'.$config['cf_cert_kcp_cd']; $site_cd = 'SM'.$config['cf_cert_kcp_cd'];
$cert_url = 'https://cert.kcp.co.kr/kcp_cert/cert_view.jsp'; $cert_url = 'https://cert.kcp.co.kr/kcp_cert/cert_view.jsp';
$kcp_enc_key = $config['cf_cert_kcp_enckey'];
} else if ($config['cf_cert_use'] == 1) { // 테스트사용 } else if ($config['cf_cert_use'] == 1) { // 테스트사용
$site_cd = 'S6186'; $site_cd = 'S6186';
$cert_url = 'https://testcert.kcp.co.kr/kcp_cert/cert_view.jsp'; $cert_url = 'https://testcert.kcp.co.kr/kcp_cert/cert_view.jsp';
$kcp_enc_key = 'E66DCEB95BFBD45DF9DFAEEBCB092B5DC2EB3BF0';
} else { // 사용안함 } else { // 사용안함
$site_cd = ''; $site_cd = '';
$cert_url = ''; $cert_url = '';
$kcp_enc_key = '';
} }
if(!$site_cd) if(!$site_cd)
+12 -1
View File
@@ -27,6 +27,8 @@ if(!$ordr_idxx)
$ct_cert = new C_CT_CLI; $ct_cert = new C_CT_CLI;
$ct_cert->mf_clear(); $ct_cert->mf_clear();
$sbParam = '';
$year = "00"; $year = "00";
$month = "00"; $month = "00";
$day = "00"; $day = "00";
@@ -47,7 +49,7 @@ $hash_data = $site_cd .
$sex_code . $sex_code .
$local_code; $local_code;
$up_hash = $ct_cert->make_hash_data( $home_dir, $hash_data ); $up_hash = $ct_cert->make_hash_data( $home_dir, $kcp_enc_key, $hash_data );
$ct_cert->mf_clear(); $ct_cert->mf_clear();
?> ?>
@@ -101,10 +103,19 @@ $ct_cert->mf_clear();
<!-- up_hash 검증 을 위한 필드 --> <!-- up_hash 검증 을 위한 필드 -->
<input type="hidden" name="veri_up_hash" value=""/> <input type="hidden" name="veri_up_hash" value=""/>
<!-- web_siteid 을 위한 필드 -->
<input type="hidden" name="web_siteid_hashYN" value=""/>
<!-- 가맹점 사용 필드 (인증완료시 리턴)--> <!-- 가맹점 사용 필드 (인증완료시 리턴)-->
<input type="hidden" name="param_opt_1" value="opt1"/> <input type="hidden" name="param_opt_1" value="opt1"/>
<input type="hidden" name="param_opt_2" value="opt2"/> <input type="hidden" name="param_opt_2" value="opt2"/>
<input type="hidden" name="param_opt_3" value="opt3"/> <input type="hidden" name="param_opt_3" value="opt3"/>
<?php if ($config['cf_cert_kcp_enckey']) { ?>
<!-- 리턴 암호화 고도화 -->
<input type="hidden" name="cert_enc_use_ext" value="Y"/>
<input type='hidden' name='kcp_cert_lib_ver' value="<?php echo $ct_cert->get_kcp_lib_ver( $home_dir ); ?>"/>
<?php } ?>
</form> </form>
<script> <script>
+19 -5
View File
@@ -12,6 +12,7 @@ $enc_data = "";
$req_tx = ""; $req_tx = "";
$enc_cert_data = ""; $enc_cert_data = "";
$enc_cert_data2 = "";
$cert_info = ""; $cert_info = "";
$tran_cd = ""; $tran_cd = "";
@@ -68,6 +69,11 @@ for($i=0; $i<count($key); $i++)
$enc_cert_data = f_get_parm_str ( $valParam ); $enc_cert_data = f_get_parm_str ( $valParam );
} }
if ( $nmParam == "enc_cert_data2" )
{
$enc_cert_data2 = f_get_parm_str ( $valParam );
}
if ( $nmParam == "dn_hash" ) if ( $nmParam == "dn_hash" )
{ {
$dn_hash = f_get_parm_str ( $valParam ); $dn_hash = f_get_parm_str ( $valParam );
@@ -98,16 +104,24 @@ if( $cert_enc_use == "Y" )
// 해당 데이터의 위변조를 방지합니다 // 해당 데이터의 위변조를 방지합니다
$veri_str = $site_cd.$ordr_idxx.$cert_no; // 사이트 코드 + 주문번호 + 인증거래번호 $veri_str = $site_cd.$ordr_idxx.$cert_no; // 사이트 코드 + 주문번호 + 인증거래번호
if ( $ct_cert->check_valid_hash ( $home_dir , $dn_hash , $veri_str ) != "1" ) $enc_cert_real_data = $enc_cert_data2;
$bin_path = 'bin';
if ((int)$config['cf_cert_use'] === 2 && !$config['cf_cert_kcp_enckey']) {
$bin_path = 'bin_old';
$enc_cert_real_data = $enc_cert_data;
}
if ( $ct_cert->check_valid_hash ( $home_dir , $kcp_enc_key, $dn_hash , $veri_str ) != "1" )
{ {
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
// 검증 실패시 처리 영역 // 검증 실패시 처리 영역
if(PHP_INT_MAX == 2147483647) // 32-bit if(PHP_INT_MAX == 2147483647) // 32-bit
$bin_exe = '/bin/ct_cli'; $bin_exe = '/'.$bin_path.'/ct_cli';
else else
$bin_exe = '/bin/ct_cli_x64'; $bin_exe = '/'.$bin_path.'/ct_cli_x64';
} else { } else {
$bin_exe = '/bin/ct_cli_exe.exe'; $bin_exe = '/'.$bin_path.'/ct_cli_exe.exe';
} }
echo "dn_hash 변조 위험있음 (".G5_KCPCERT_PATH.$bin_exe." 파일에 실행권한이 있는지 확인하세요.)"; echo "dn_hash 변조 위험있음 (".G5_KCPCERT_PATH.$bin_exe." 파일에 실행권한이 있는지 확인하세요.)";
@@ -122,7 +136,7 @@ if( $cert_enc_use == "Y" )
// site_cd 와 cert_no 를 가지고 복화화 하는 함수 입니다. // site_cd 와 cert_no 를 가지고 복화화 하는 함수 입니다.
// 정상적으로 복호화 된경우에만 인증데이터를 가져올수 있습니다. // 정상적으로 복호화 된경우에만 인증데이터를 가져올수 있습니다.
$opt = "1" ; // 복호화 인코딩 옵션 ( UTF - 8 사용시 "1" ) $opt = "1" ; // 복호화 인코딩 옵션 ( UTF - 8 사용시 "1" )
$ct_cert->decrypt_enc_cert( $home_dir , $site_cd , $cert_no , $enc_cert_data , $opt ); $ct_cert->decrypt_enc_cert( $home_dir , $kcp_enc_key, $site_cd , $cert_no , $enc_cert_real_data , $opt );
$comm_id = $ct_cert->mf_get_key_value("comm_id" ); // 이동통신사 코드 $comm_id = $ct_cert->mf_get_key_value("comm_id" ); // 이동통신사 코드
$phone_no = $ct_cert->mf_get_key_value("phone_no" ); // 전화번호 $phone_no = $ct_cert->mf_get_key_value("phone_no" ); // 전화번호
+102 -34
View File
@@ -19,21 +19,38 @@ class C_CT_CLI
$this->m_dec_data=""; $this->m_dec_data="";
} }
function get_bin_dirname()
{
global $config;
$bin_path = ((int)$config['cf_cert_use'] === 2 && !$config['cf_cert_kcp_enckey']) ? 'bin_old' : 'bin';
return $bin_path;
}
// hash 처리 영역 // hash 처리 영역
function make_hash_data( $home_dir , $str ) function make_hash_data( $home_dir , $key , $str )
{ {
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit if(PHP_INT_MAX == 2147483647) // 32-bit
$bin_exe = $home_dir . '/bin/ct_cli'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli';
else else
$bin_exe = $home_dir . '/bin/ct_cli_x64'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_x64';
} else { } else {
$bin_exe = $home_dir . '/bin/ct_cli_exe.exe'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_exe.exe';
}
if ($key) {
$hash_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__make_hash_data",
$key,
$str
);
} else {
$hash_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__make_hash_data",
$str
);
} }
$hash_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__make_hash_data",
$str
);
if ( $hash_data == "" ) { $hash_data = "HS01"; } if ( $hash_data == "" ) { $hash_data = "HS01"; }
@@ -41,21 +58,31 @@ class C_CT_CLI
} }
// dn_hash 체크 함수 // dn_hash 체크 함수
function check_valid_hash ($home_dir , $hash_data , $str ) function check_valid_hash ($home_dir , $key , $hash_data , $str )
{ {
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit if(PHP_INT_MAX == 2147483647) // 32-bit
$bin_exe = $home_dir . '/bin/ct_cli'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli';
else else
$bin_exe = $home_dir . '/bin/ct_cli_x64'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_x64';
} else { } else {
$bin_exe = $home_dir . '/bin/ct_cli_exe.exe'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_exe.exe';
}
if ($key) {
$ret_val = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__check_valid_hash" ,
$key,
$hash_data ,
$str
);
} else {
$ret_val = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__check_valid_hash" ,
$hash_data ,
$str
);
} }
$ret_val = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__check_valid_hash" ,
$hash_data ,
$str
);
if ( $ret_val == "" ) { $ret_val = "HS02"; } if ( $ret_val == "" ) { $ret_val = "HS02"; }
@@ -63,31 +90,52 @@ class C_CT_CLI
} }
// 암호화 인증데이터 복호화 // 암호화 인증데이터 복호화
function decrypt_enc_cert ( $home_dir, $site_cd , $cert_no , $enc_cert_data , $opt) function decrypt_enc_cert ( $home_dir, $key , $site_cd , $cert_no , $enc_cert_data , $opt)
{ {
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit if(PHP_INT_MAX == 2147483647) // 32-bit
$bin_exe = $home_dir . '/bin/ct_cli'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli';
else else
$bin_exe = $home_dir . '/bin/ct_cli_x64'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_x64';
$dec_data = $this -> mf_exec( $bin_exe , if ($key) {
"lf_CT_CLI__decrypt_enc_cert" , $dec_data = $this -> mf_exec( $bin_exe ,
$site_cd , "lf_CT_CLI__decrypt_enc_cert" ,
$cert_no , $key,
$enc_cert_data , $site_cd ,
$opt $cert_no ,
); $enc_cert_data ,
$opt
);
} else {
$dec_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__decrypt_enc_cert" ,
$site_cd ,
$cert_no ,
$enc_cert_data ,
$opt
);
}
} else { } else {
$bin_exe = $home_dir . '/bin/ct_cli_exe.exe'; $bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_exe.exe';
$dec_data = $this -> mf_exec( $bin_exe , if ($key) {
"lf_CT_CLI__decrypt_enc_cert" , $dec_data = $this -> mf_exec( $bin_exe ,
$site_cd , "lf_CT_CLI__decrypt_enc_cert" ,
$cert_no , $key,
$enc_cert_data $site_cd ,
); $cert_no ,
$enc_cert_data
);
} else {
$dec_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__decrypt_enc_cert" ,
$site_cd ,
$cert_no ,
$enc_cert_data
);
}
} }
if ( $dec_data == "" ) { $dec_data = "HS03"; } if ( $dec_data == "" ) { $dec_data = "HS03"; }
@@ -96,6 +144,26 @@ class C_CT_CLI
parse_str( str_replace( chr( 31 ), "&", $dec_data ), $this->m_dec_data ); parse_str( str_replace( chr( 31 ), "&", $dec_data ), $this->m_dec_data );
} }
function get_kcp_lib_ver( $home_dir )
{
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit
$bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli';
else
$bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_x64';
} else {
$bin_exe = $home_dir . '/'.$this->get_bin_dirname().'/ct_cli_exe.exe';
}
$ver_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__get_kcp_lib_ver"
);
if ( $ver_data == "" ) { $ver_data = "HS04"; }
return $ver_data;
}
// 인증데이터 get data // 인증데이터 get data
function mf_get_key_value( $name ) function mf_get_key_value( $name )
{ {
+1 -1
View File
@@ -111,7 +111,7 @@ $_SESSION['lgd_certify'] = $payReqMap;
<title>LG유플러스 전자결제 본인확인서비스</title> <title>LG유플러스 전자결제 본인확인서비스</title>
<!-- 고객사 사이트가 https인 경우는 아래 http://을 https:// 으로 변경하시면 됩니다. --> <!-- 고객사 사이트가 https인 경우는 아래 http://을 https:// 으로 변경하시면 됩니다. -->
<link rel="stylesheet" href="<?php echo G5_CSS_URL;?>/default.css"> <link rel="stylesheet" href="<?php echo G5_CSS_URL;?>/default.css">
<script language="javascript" src="<?php echo (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'https' : 'http'; ?>://xpay.uplus.co.kr/xpay/js/xpay_crossplatform.js" type="text/javascript"></script> <script language="javascript" src="https://xpay.tosspayments.com/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
+2 -3
View File
@@ -1,3 +1,2 @@
url = https://xpayclient.lgdacom.net/xpay/Gateway.do url = https://xpay-gateway.tosspayments.com/xpay/Gateway.do
test_url = https://pretestclient.uplus.co.kr:9443/xpay/Gateway.do test_url = https://xpay-gateway-sandbox.tosspayments.com/xpay/Gateway.do
aux_url = http://xpayclient.lgdacom.net:7080/xpay/Gateway.do
+1 -1
View File
@@ -151,7 +151,7 @@ function social_before_join_check($url=''){
return false; return false;
} }
function social_get_data($by='provider', $provider, $user_profile){ function social_get_data($by, $provider, $user_profile){
global $g5; global $g5;
// 소셜 가입이 되어 있는지 체크 // 소셜 가입이 되어 있는지 체크
+5 -4
View File
@@ -149,6 +149,11 @@ else // 장바구니에 담기
$post_io_types = (isset($_POST['io_type']) && is_array($_POST['io_type'])) ? $_POST['io_type'] : array(); $post_io_types = (isset($_POST['io_type']) && is_array($_POST['io_type'])) ? $_POST['io_type'] : array();
$post_ct_qtys = (isset($_POST['ct_qty']) && is_array($_POST['ct_qty'])) ? $_POST['ct_qty'] : array(); $post_ct_qtys = (isset($_POST['ct_qty']) && is_array($_POST['ct_qty'])) ? $_POST['ct_qty'] : array();
if ($count && $sw_direct) {
// 바로구매에 있던 장바구니 자료를 지운다.
sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false);
}
for($i=0; $i<$count; $i++) { for($i=0; $i<$count; $i++) {
// 보관함의 상품을 담을 때 체크되지 않은 상품 건너뜀 // 보관함의 상품을 담을 때 체크되지 않은 상품 건너뜀
if($act == 'multi' && ! (isset($post_chk_it_id[$i]) && $post_chk_it_id[$i])) if($act == 'multi' && ! (isset($post_chk_it_id[$i]) && $post_chk_it_id[$i]))
@@ -180,10 +185,6 @@ else // 장바구니에 담기
if(!$it['it_id']) if(!$it['it_id'])
alert('상품정보가 존재하지 않습니다.'); alert('상품정보가 존재하지 않습니다.');
// 바로구매에 있던 장바구니 자료를 지운다.
if($i == 0 && $sw_direct)
sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false);
// 최소, 최대 수량 체크 // 최소, 최대 수량 체크
if($it['it_buy_min_qty'] || $it['it_buy_max_qty']) { if($it['it_buy_min_qty'] || $it['it_buy_max_qty']) {
$sum_qty = 0; $sum_qty = 0;
+2 -2
View File
@@ -5,10 +5,10 @@ if($od['od_pg'] != 'lg') return;
if($default['de_card_test']) { if($default['de_card_test']) {
$mid = 'tsi_'.$config['cf_lg_mid']; $mid = 'tsi_'.$config['cf_lg_mid'];
$service_url = "http://pgweb.uplus.co.kr:7085/pg/wmp/mertadmin/jsp/escrow/rcvdlvinfo.jsp"; $service_url = "https://pgweb.tosspayments.com:9091/pg/wmp/mertadmin/jsp/escrow/rcvdlvinfo.jsp";
} else { } else {
$mid = 'si_'.$config['cf_lg_mid']; $mid = 'si_'.$config['cf_lg_mid'];
$service_url = "https://pgweb.uplus.co.kr/pg/wmp/mertadmin/jsp/escrow/rcvdlvinfo.jsp"; $service_url = "https://pgweb.tosspayments.com/pg/wmp/mertadmin/jsp/escrow/rcvdlvinfo.jsp";
} }
// 택배사코드 // 택배사코드
+2 -2
View File
@@ -6,9 +6,9 @@ if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use']
?> ?>
<?php if ($default['de_card_test']) { // 테스트 결제시 ?> <?php if ($default['de_card_test']) { // 테스트 결제시 ?>
<script language="javascript" src="https://pretest.uplus.co.kr:9443/xpay/js/xpay_crossplatform.js" type="text/javascript"></script> <script language="javascript" src="https://js.tosspayments.com/xpay_crossplatform/sandbox/v1" type="text/javascript"></script>
<?php } else { //실 결제시 ?> <?php } else { //실 결제시 ?>
<script language="javascript" src="<?php echo (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'https' : 'http'; ?>://xpay.uplus.co.kr/xpay/js/xpay_crossplatform.js" type="text/javascript"></script> <script language="javascript" src="https://xpay.tosspayments.com/xpay/js/xpay_crossplatform.js" type="text/javascript"></script>
<?php } ?> <?php } ?>
<script type="text/javascript"> <script type="text/javascript">
-5
View File
@@ -36,8 +36,6 @@ try{
'CharSet' => 'utf-8' 'CharSet' => 'utf-8'
); );
if (function_exists('add_log')) add_log($data);
/* /*
**************************************************************************************** ****************************************************************************************
* <Cancel Request> * <Cancel Request>
@@ -47,9 +45,6 @@ try{
$result = json_decode($response, true); $result = json_decode($response, true);
if (function_exists('add_log')) add_log(array('1'=>1));
if (function_exists('add_log')) add_log($result, true, 'cc');
}catch(Exception $e){ }catch(Exception $e){
$e->getMessage(); $e->getMessage();
$ResultCode = "9999"; $ResultCode = "9999";
-2
View File
@@ -12,8 +12,6 @@ if (! ($default['de_pg_service'] == 'nicepay' && $orderNumber)){
die(json_encode(array('error'=>'올바른 방법으로 이용해 주십시오.'))); die(json_encode(array('error'=>'올바른 방법으로 이용해 주십시오.')));
} }
if (function_exists('add_log')) add_log($_POST, false, 'ajax');
$price = preg_replace('#[^0-9]#', '', $_POST['price']); $price = preg_replace('#[^0-9]#', '', $_POST['price']);
if (strlen($price) < 1) { if (strlen($price) < 1) {
+5 -5
View File
@@ -5,6 +5,11 @@ if($od['od_pg'] != 'nicepay') return;
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php'); include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
if (!$escrow_numb) {
// 송장번호가 없으면 등록이 안된다.
return;
}
$mid = $default['de_nicepay_mid']; $mid = $default['de_nicepay_mid'];
$tid = $escrow_tno; // 거래 번호 $tid = $escrow_tno; // 거래 번호
$reqType = '03'; // 요청타입 (배송등록 03) $reqType = '03'; // 요청타입 (배송등록 03)
@@ -45,8 +50,6 @@ $response = nicepay_reqPost($data, $escrowRequestURL);
$nice_result = json_decode($response, true); $nice_result = json_decode($response, true);
if (function_exists('add_log')) add_log($nice_result, true, 'es');
// 성공이면 // 성공이면
if (isset($nice_result['ResultCode']) && $nice_result['ResultCode'] === 'C000') { if (isset($nice_result['ResultCode']) && $nice_result['ResultCode'] === 'C000') {
@@ -72,6 +75,3 @@ $resultCode = $nice_result['ResultCode']; // 결과코드 ("00"이면 지
$resultMsg = $nice_result['ResultMsg']; // 결과내용 (지불결과에 대한 설명) $resultMsg = $nice_result['ResultMsg']; // 결과내용 (지불결과에 대한 설명)
$dlv_date = $nice_result['ProcessDate']; $dlv_date = $nice_result['ProcessDate'];
$dlv_time = $nice_result['ProcessTime']; $dlv_time = $nice_result['ProcessTime'];
echo "에스크로배송";
exit;
-4
View File
@@ -4,8 +4,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 나이스페이 공통 설정 // 나이스페이 공통 설정
require_once(G5_SHOP_PATH.'/settle_nicepay.inc.php'); require_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
if (function_exists('add_log')) add_log($_POST);
/* /*
**************************************************************************************** ****************************************************************************************
* <Authentication Result Parameter> * <Authentication Result Parameter>
@@ -114,8 +112,6 @@ if($authResultCode === "0000"){
$respArr = json_decode($response, true); $respArr = json_decode($response, true);
if (function_exists('add_log')) add_log($respArr);
$ResultCode = nicepay_res('ResultCode', $respArr); $ResultCode = nicepay_res('ResultCode', $respArr);
$ResultMsg = nicepay_res('ResultMsg', $respArr); $ResultMsg = nicepay_res('ResultMsg', $respArr);
$tno = nicepay_res('TID', $respArr); $tno = nicepay_res('TID', $respArr);
-2
View File
@@ -84,8 +84,6 @@ $response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cash_rec
$result = json_decode($response, true); $result = json_decode($response, true);
if (function_exists('add_log')) add_log($result, true, 'rr');
// 성공이면 // 성공이면
if (isset($result['ResultCode']) && $result['ResultCode'] === '7001') { if (isset($result['ResultCode']) && $result['ResultCode'] === '7001') {
+8
View File
@@ -652,6 +652,10 @@ if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_
case 'inicis': case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break; break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
case 'KAKAOPAY': case 'KAKAOPAY':
$_REQUEST['TID'] = $tno; $_REQUEST['TID'] = $tno;
$_REQUEST['Amt'] = $amount; $_REQUEST['Amt'] = $amount;
@@ -707,6 +711,10 @@ if(!$result) {
case 'inicis': case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break; break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
case 'KAKAOPAY': case 'KAKAOPAY':
$_REQUEST['TID'] = $tno; $_REQUEST['TID'] = $tno;
$_REQUEST['Amt'] = $amount; $_REQUEST['Amt'] = $amount;
-2
View File
@@ -1,8 +1,6 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (function_exists('add_log')) add_log($_POST, false, 'vv');
$NICEPAY_log_path = G5_DATA_PATH.'/log'; // 나이스페이 가상계좌 로그저장 경로 $NICEPAY_log_path = G5_DATA_PATH.'/log'; // 나이스페이 가상계좌 로그저장 경로
$NICEPAY_payLog = false; // 로그를 기록하려면 true 로 수정 $NICEPAY_payLog = false; // 로그를 기록하려면 true 로 수정
+1 -1
View File
@@ -2,7 +2,7 @@
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_VERSION', '그누보드5'); define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.6.4'); define('G5_GNUBOARD_VER', '5.6.8');
// 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전을 합쳐서 그누보드5.4.6 버전에서 시작함 (kagla-210617) // 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전을 합쳐서 그누보드5.4.6 버전에서 시작함 (kagla-210617)
// G5_YOUNGCART_VER 이 상수를 사용하는 곳이 있으므로 주석 처리 해제함 // G5_YOUNGCART_VER 이 상수를 사용하는 곳이 있으므로 주석 처리 해제함
// 그누보드5.4.6 이상 버전 부터는 영카트를 그누보드에 포함하여 배포하므로 영카트5의 버전은 의미가 없습니다. // 그누보드5.4.6 이상 버전 부터는 영카트를 그누보드에 포함하여 배포하므로 영카트5의 버전은 의미가 없습니다.