Compare commits

...
38 Commits
Author SHA1 Message Date
thisgun aa88ff68a1 KG이니시스 IDC 센터코드 검증 추가2 2025-06-12 17:34:53 +09:00
thisgun 07a0245f85 버전 5.6.14 수정 2025-06-12 17:17:33 +09:00
thisgun d3de613a8c 관리자 로그인시 새글 테이블 OPIMIZE 실행시 딜레이 되는 문제 개선 2025-06-12 17:05:55 +09:00
thisgun bb1f69e86c KG이니시스 IDC 센터코드 검증 추가 2025-06-05 16:11:20 +09:00
thisgun dc4c2a79d9 XSS 취약점 수정 박재형님 제보 2025-06-05 14:12:55 +09:00
thisgun 38451a7d3d [KVE-2025-0384]XSS lead to RCE 취약점 수정 2025-06-04 17:44:50 +09:00
thisgun 87d11d5c78 변수 초기화 되지 않아 warning 메시지 출려되는 현상 수정 2025-06-04 14:40:18 +09:00
thisgun c1bbce1114 KG이니시스 가상계좌 에스크로 IP 추가 2025-05-28 11:27:59 +09:00
thisgun 61576d3e87 [KVE-2025-0351]ip 검증 취약점 수정 2025-05-28 10:57:33 +09:00
thisgun c9100d2e38 NHN_KCP 본인인증 테스트 오류 수정 2025-05-23 12:19:22 +09:00
thisgun 7714153faf 버전 5.6.13 수정 2025-05-15 15:31:41 +09:00
thisgun 654fd7ba68 방문자 기록 sql 문 수정 2025-05-15 15:30:40 +09:00
thisgun ea9f618de8 KG이니시스 모바일 가상계좌 IP 추가 2025-05-15 15:29:26 +09:00
thisgun eea5a2477b 쇼핑몰관리자 나이스페이신청 URL 링크 수정 2025-05-15 14:23:38 +09:00
thisgun 8cc101b617 접근차단 ip코드 다시 재수정 2025-05-15 14:09:27 +09:00
thisgun 316d3542a9 [KVE-2025-0259]XSS 취약점 수정 2025-05-15 09:53:28 +09:00
thisgun c2da219473 [KVE-2025-0286]XSS 취약점 수정 2025-05-14 12:49:03 +09:00
thisgun 6874e767c2 kcp 모바일 테스트결제 url 변경 2025-05-14 12:00:09 +09:00
thisgun 5a91d37365 php warning 메시지 코드 수정 2025-05-14 11:59:40 +09:00
thisgun f9c972d866 [KVE-2025-0191] Stored XSS (bypass html_purify via Open Redirect) 취약점 수정 2025-04-17 16:04:01 +09:00
thisgun ada8f28aae 버전 5.6.12 수정 2025-04-15 16:33:05 +09:00
thisgun 11afc52b84 접근차단 ip 코드의 위치 다시 재수정 2025-04-15 16:31:27 +09:00
thisgun d9c3f0e66c Merge branch 'master' of github.com:gnuboard/gnuboard5 2025-04-15 12:06:31 +09:00
thisgun 49da5c33df 버전 5.6.11 수정 2025-04-15 11:56:53 +09:00
thisgun 29250f264a 첩근차단 ip코드의 위치 수정 2025-04-15 11:44:40 +09:00
thisgun df00641290 php warning 메시지 코드 수정 2025-04-15 11:20:44 +09:00
thisgun a05a1403f5 Merge branch 'master' of github.com:gnuboard/g5-update 2025-04-15 10:52:11 +09:00
총 c5817594d0 [KVE-2025-0234] 관리자 XSS 취약점 수정 2025-04-15 10:11:31 +09:00
kagla 68a9e45337 Revert "경로 수정 및 불필요한 파일 삭제: CSS 파일 경로를 절대 경로로 변경하고, 사용되지 않는 install.css 및 이미지 파일을 삭제함. 또한, 여러 파일에서 include 경로를 수정하여 일관성을 유지함."
This reverts commit b8da0f0890.
2025-04-11 13:06:43 +09:00
kagla b8da0f0890 경로 수정 및 불필요한 파일 삭제: CSS 파일 경로를 절대 경로로 변경하고, 사용되지 않는 install.css 및 이미지 파일을 삭제함. 또한, 여러 파일에서 include 경로를 수정하여 일관성을 유지함. 2025-04-11 12:56:45 +09:00
thisgun 62ff45b31f php warning 메시지 코드 수정 2025-03-31 15:36:32 +09:00
thisgun 918ad48675 이미지 태그에 loading=lazy 가 있을경우 viewimagereisze 함수에서 width 속성을 추가하지 않도록 수정#355 2025-03-14 16:40:26 +09:00
thisgun e5128bf02e cheditor5 에 지도아이콘 제거 2025-02-20 12:52:39 +09:00
thisgun 0a0d6e7228 버전 5.6.10 수정 2025-02-04 11:17:21 +09:00
thisgun 69180914f8 쇼핑몰 가상계좌 정보(toss)에 은행이름이 하나 더 붙은 문제 수정 2025-02-04 11:01:41 +09:00
thisgun 5552fda906 사이드뷰에서 잘못된 닉네임 또는 이름이 출력되는 오류 수정 2025-02-04 10:49:01 +09:00
thisgun 13759821fe 메일 함수 예외 로그 추가 #354 2025-02-03 17:56:42 +09:00
thisgun 2e7843da56 php warning 메시지 코드 수정 2025-02-03 11:36:01 +09:00
46 changed files with 433 additions and 185 deletions
+10 -1
View File
@@ -554,9 +554,18 @@ function admin_check_xss_params($params)
if (is_array($value)) {
admin_check_xss_params($value);
} else if ((preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/(onload|onerror)=.*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) || (preg_match('/(onload|onerror|focus)=.*/ius', $value) && preg_match('/(eval|expression|exec|prompt)(\s*)\((.*)\)/ius', $value))) {
} else if (
(preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/on[a-z]+=*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) ||
(preg_match('/(on[a-z]+|focus)=.*/ius', $value) && preg_match('/(eval|atob|fetch|expression|exec|prompt)(\s*)\((.*)\)/ius', $value))) {
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
die();
} else if (preg_match('/atob\s*\(\s*[\'"]?([a-zA-Z0-9+\/=]+)[\'"]?\s*\)/ius', $value, $matches)) {
$decoded = base64_decode($matches[1], true);
if ($decoded && preg_match('/(eval|fetch|script|alert|settimeout|setinterval)/ius', $decoded)) {
// error_log("Base64 XSS 시도 감지: key=$key, decoded=$decoded, IP=" . $_SERVER['REMOTE_ADDR']);
alert('Base64로 인코딩된 위험한 스크립트가 발견되었습니다.', G5_URL);
die();
}
}
}
+79 -2
View File
@@ -1557,7 +1557,17 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table>
</div>
</section>
<div id="config_captcha_wrap" style="display:none">
<h2>캡챠입력</h2>
<?php
require_once G5_CAPTCHA_PATH . '/captcha.lib.php';
$captcha_html = captcha_html();
$captcha_js = chk_captcha_js();
echo $captcha_html;
?>
</div>
<div class="btn_fixed_top btn_confirm">
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
</div>
@@ -1629,10 +1639,61 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
});
});
// 각 요소의 초기값 저장
var initialValues = {
cf_admin: $('#cf_admin').val(),
cf_analytics: $('#cf_analytics').val(),
cf_add_meta: $('#cf_add_meta').val(),
cf_add_script: $('#cf_add_script').val()
};
function check_config_captcha_open() {
var isChanged = false;
// 현재 값이 있는 경우에만 변경 여부 체크
if ($('#cf_admin').val()) {
isChanged = isChanged || $('#cf_admin').val() !== initialValues.cf_admin;
}
if ($('#cf_analytics').val()) {
isChanged = isChanged || $('#cf_analytics').val() !== initialValues.cf_analytics;
}
if ($('#cf_add_meta').val()) {
isChanged = isChanged || $('#cf_add_meta').val() !== initialValues.cf_add_meta;
}
if ($('#cf_add_script').val()) {
isChanged = isChanged || $('#cf_add_script').val() !== initialValues.cf_add_script;
}
var $wrap = $("#config_captcha_wrap"),
tooptipid = "mp_captcha_tooltip",
$p_text = $("<p>", {id:tooptipid, style:"font-size:0.95em;letter-spacing:-0.1em"}).html("중요정보를 수정할 경우 캡챠를 입력해야 합니다."),
$children = $wrap.children(':first'),
is_invisible_recaptcha = $("#captcha").hasClass("invisible_recaptcha");
if(isChanged){
$wrap.show();
if(! is_invisible_recaptcha) {
$wrap.css("margin-top","1em");
if(! $("#"+tooptipid).length){ $children.after($p_text) }
}
} else {
$wrap.hide();
if($("#"+tooptipid).length && ! is_invisible_recaptcha){ $children.next("#"+tooptipid).remove(); }
}
return isChanged;
}
function fconfigform_submit(f) {
var current_user_ip = "<?php echo $_SERVER['REMOTE_ADDR']; ?>";
var cf_intercept_ip_val = f.cf_intercept_ip.value;
if (check_config_captcha_open()){
jQuery("html, body").scrollTop(jQuery("#config_captcha_wrap").offset().top);
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
}
if (cf_intercept_ip_val && current_user_ip) {
var cf_intercept_ips = cf_intercept_ip_val.split("\n");
@@ -1653,6 +1714,22 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
f.action = "./config_form_update.php";
return true;
}
jQuery(function($){
$("#captcha_key").prop('required', false).removeAttr("required").removeClass("required");
// 최고관리자 변경시
$(document).on('change', '#cf_admin', check_config_captcha_open);
// 방문자분석 스크립트 변경시
$(document).on('input', '#cf_analytics', check_config_captcha_open);
// 추가 메타태그 변경시
$(document).on('input', '#cf_add_meta', check_config_captcha_open);
// 추가 script, css 변경시
$(document).on('input', '#cf_add_script', check_config_captcha_open);
});
</script>
<?php
+34
View File
@@ -10,6 +10,9 @@ if ($is_admin != 'super') {
alert('최고관리자만 접근 가능합니다.');
}
$sql = " select * from {$g5['config_table']} limit 1";
$ori_config = sql_fetch($sql);
$cf_title = isset($_POST['cf_title']) ? strip_tags(clean_xss_attributes($_POST['cf_title'])) : '';
$cf_admin = isset($_POST['cf_admin']) ? clean_xss_tags($_POST['cf_admin'], 1, 1) : '';
@@ -185,6 +188,33 @@ if (!$_POST['cf_cert_use']) {
$_POST['cf_cert_simple'] = '';
}
// 관리자가 자동등록방지를 사용해야 할 경우 ( 기본환경설정에서 최고관리자, 방문자분석 스크립트, 추가 메타태그, 추가 script, css 변경시 )
$check_captcha = 0;
if ($cf_admin && $ori_config['cf_admin'] !== $cf_admin) {
$check_captcha = 1;
}
if ($_POST['cf_analytics'] && $ori_config['cf_analytics'] !== stripslashes($_POST['cf_analytics'])) {
$check_captcha = 1;
}
if ($_POST['cf_add_meta'] && $ori_config['cf_add_meta'] !== stripslashes($_POST['cf_add_meta'])) {
$check_captcha = 1;
}
if ($_POST['cf_add_script'] && $ori_config['cf_add_script'] !== stripslashes($_POST['cf_add_script'])) {
$check_captcha = 1;
}
if ($check_captcha) {
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
}
$sql = " update {$g5['config_table']}
set cf_title = '{$cf_title}',
cf_admin = '{$cf_admin}',
@@ -346,6 +376,10 @@ if (isset($_POST['cf_bbs_rewrite'])) {
g5_delete_all_cache();
}
if (function_exists('get_admin_captcha_by')) {
get_admin_captcha_by('remove');
}
run_event('admin_config_form_update');
update_rewrite_rules();
+1 -1
View File
@@ -455,7 +455,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
<?php if ($config['cf_use_recommend']) { // 추천인 사용 ?>
<tr>
<th scope="row">추천인</th>
<td colspan="3"><?php echo ($mb['mb_recommend'] ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
<td colspan="3"><?php echo ((isset($mb['mb_recommend']) && $mb['mb_recommend']) ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
</tr>
<?php } ?>
+1 -1
View File
@@ -19,7 +19,7 @@ $mb_certify = isset($_POST['mb_certify']) ? preg_replace('/[^0-9a-z_]/i', ''
$mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_zip']) : '';
// 관리자가 자동등록방지를 사용해야 할 경우 ( 회원의 비밀번호 변경시 캡챠를 체크한다 )
if ($mb_password && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) {
if ($mb_password) {
include_once(G5_CAPTCHA_PATH . '/captcha.lib.php');
if (!chk_captcha()) {
+13 -1
View File
@@ -117,6 +117,15 @@ if ($new == 'new' || !$code) {
});
});
function htmlEscape(str) {
return str
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
}
function add_menu_list(name, link, code) {
var $menulist = $("#menulist", opener.document);
var ms = new Date().getTime();
@@ -126,7 +135,10 @@ if ($new == 'new' || !$code) {
<?php } else { ?>
sub_menu_class = " class=\"td_category sub_menu_class\"";
<?php } ?>
name = htmlEscape(name);
link = htmlEscape(link);
var list = "<tr class=\"menu_list menu_group_<?php echo $code; ?>\">";
list += "<td" + sub_menu_class + ">";
list += "<label for=\"me_name_" + ms + "\" class=\"sound_only\">메뉴<strong class=\"sound_only\"> 필수</strong></label>";
+1 -1
View File
@@ -949,7 +949,7 @@ if(!$default['de_kakaopay_cancelpwd']){
</tr>
<tr class="pg_info_fld nicepay_info_fld" id="nicepay_info_anchor">
<th scope="row"><label for="de_nicepay_mid">NICEPAY MID</label><br><a href="http://sir.kr/main/service/inicis_pg.php" target="_blank" id="scf_nicepay_reg" class="nicepay_btn">NICEPAY 신청하기</a></th>
<th scope="row"><label for="de_nicepay_mid">NICEPAY MID</label><br><a href="http://sir.kr/main/service/nicepayments_pg.php" target="_blank" id="scf_nicepay_reg" class="nicepay_btn">NICEPAY 신청하기</a></th>
<td>
<span class="frm_info">NICEPAY로 부터 발급 받으신 상점MID를 SR 을 제외한 나머지 자리를 입력 합니다.<br>NICEPAY 상점관리자 > 가맹점정보 > KEY관리에서 확인 할수 있습니다.<br>만약, 상점아이디가 SR로 시작하지 않는다면 계약담당자에게 변경 요청을 해주시기 바랍니다. 예) SRpaytestm</span>
<span class="sitecode">SR</span>
+7 -7
View File
@@ -46,13 +46,13 @@ include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
?>
<form name="fcouponform" action="./couponformupdate.php" method="post" onsubmit="return form_check(this);">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="cp_id" value="<?php echo $cp_id; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page;?>">
<input type="hidden" name="w" value="<?php echo get_sanitize_input($w); ?>">
<input type="hidden" name="cp_id" value="<?php echo get_sanitize_input($cp_id); ?>">
<input type="hidden" name="sst" value="<?php echo get_sanitize_input($sst); ?>">
<input type="hidden" name="sod" value="<?php echo get_sanitize_input($sod); ?>">
<input type="hidden" name="sfl" value="<?php echo get_sanitize_input($sfl); ?>">
<input type="hidden" name="stx" value="<?php echo get_sanitize_input($stx); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page);?>">
<div class="tbl_frm01 tbl_wrap">
<table>
+4 -4
View File
@@ -68,10 +68,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<label for="sel_ca_id" class="sound_only">검색대상</label>
<select name="sel_ca_id" id="sel_ca_id">
+4 -4
View File
@@ -67,10 +67,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<label for="sel_ca_id" class="sound_only">분류선택</label>
<select name="sel_ca_id" id="sel_ca_id">
+4 -4
View File
@@ -74,10 +74,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
+2 -2
View File
@@ -85,8 +85,8 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<label for="sca" class="sound_only">분류선택</label>
<select name="sca" id="sca">
+4 -4
View File
@@ -69,10 +69,10 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<label for="sel_ca_id" class="sound_only">분류선택</label>
<select name="sel_ca_id" id="sel_ca_id">
+6 -5
View File
@@ -16,6 +16,7 @@ $sort2 = (isset($_GET['sort2']) && in_array($_GET['sort2'], array('desc', 'asc')
$sel_field = (isset($_GET['sel_field']) && in_array($_GET['sel_field'], array('od_id', 'mb_id', 'od_name', 'od_tel', 'od_hp', 'od_b_name', 'od_b_tel', 'od_b_hp', 'od_deposit_name', 'od_invoice')) ) ? $_GET['sel_field'] : '';
$od_status = isset($_GET['od_status']) ? get_search_string($_GET['od_status']) : '';
$search = isset($_GET['search']) ? get_search_string($_GET['search']) : '';
$save_search = isset($_GET['save_search']) ? get_search_string($_GET['save_search']) : '';
$fr_date = (isset($_GET['fr_date']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $_GET['fr_date'])) ? $_GET['fr_date'] : '';
$to_date = (isset($_GET['to_date']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $_GET['to_date'])) ? $_GET['to_date'] : '';
@@ -160,11 +161,11 @@ if( function_exists('pg_setting_check') ){
</div>
<form name="frmorderlist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="save_search" value="<?php echo $search; ?>">
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
<input type="hidden" name="sort1" value="<?php echo get_sanitize_input($sort1); ?>">
<input type="hidden" name="sort2" value="<?php echo get_sanitize_input($sort2); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<input type="hidden" name="save_search" value="<?php echo get_sanitize_input($search); ?>">
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
+2 -2
View File
@@ -58,8 +58,8 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</div>
<form name="flist" class="local_sch01 local_sch">
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="doc" value="<?php echo get_sanitize_input($doc); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<label for="sel_ca_id" class="sound_only">검색대상</label>
<select name="sel_ca_id" id="sel_ca_id">
+5 -1
View File
@@ -29,7 +29,11 @@ if($config['cf_popular_del'] > 0) {
if($config['cf_new_del'] > 0) {
$sql = " delete from {$g5['board_new_table']} where (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS(bn_datetime)) > '{$config['cf_new_del']}' ";
sql_query($sql);
sql_query(" OPTIMIZE TABLE `{$g5['board_new_table']}` ");
// 데이터가 많으면 처리시간 때문에 브라우저 응답이 늦을수 있음
if (defined('G5_USE_OPTIMIZE_DBTABLE') && G5_USE_OPTIMIZE_DBTABLE) {
sql_query(" OPTIMIZE TABLE `{$g5['board_new_table']}` ");
}
}
// 설정일이 지난 쪽지 삭제
+1
View File
@@ -3,6 +3,7 @@
include_once('./_common.php');
$comment_id = isset($_REQUEST['comment_id']) ? (int) $_REQUEST['comment_id'] : 0;
$token = isset($_REQUEST['token']) ? clean_xss_tags($_REQUEST['token']) : 0;
$delete_comment_token = get_session('ss_delete_comment_'.$comment_id.'_token');
set_session('ss_delete_comment_'.$comment_id.'_token', '');
+2
View File
@@ -1,6 +1,8 @@
<?php
include_once('./_common.php');
$good = isset($_REQUEST['good']) ? preg_replace('/[^a-z0-9]/i', '', $_REQUEST['good']) : '';
run_event('bbs_good_before', $bo_table, $wr_id, $good);
@include_once($board_skin_path.'/good.head.skin.php');
+7 -3
View File
@@ -1,7 +1,11 @@
<?php
include_once('./_common.php');
$html_title = '링크 &gt; '.conv_subject($write['wr_subject'], 255);
$html_title = '링크';
if (isset($write['wr_subject']) && $write['wr_subject']) {
$html_title .= ' &gt; '.conv_subject($write['wr_subject'], 255);
}
$no = isset($_REQUEST['no']) ? preg_replace('/[^0-9]/i', '', $_REQUEST['no']) : '';
@@ -10,10 +14,10 @@ if (!($bo_table && $wr_id && $no))
// SQL Injection 예방
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} ", FALSE);
if (!$row['cnt'])
if (!(isset($row['cnt']) && $row['cnt']))
alert_close('존재하는 게시판이 아닙니다.');
if (!$write['wr_link'.$no])
if (!(isset($write['wr_link'.$no]) && $write['wr_link'.$no]))
alert_close('링크가 없습니다.');
$ss_name = 'ss_link_'.$bo_table.'_'.$wr_id.'_'.$no;
+2 -2
View File
@@ -23,7 +23,7 @@ switch ($w) {
break;
case 's' :
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
if ($is_admin || (isset($write['mb_id']) && $write['mb_id'] && $member['mb_id'] == $write['mb_id']))
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
else {
$action = https_url(G5_BBS_DIR).'/password_check.php';
@@ -32,7 +32,7 @@ switch ($w) {
break;
case 'sc' :
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
if ($is_admin || (isset($write['mb_id']) && $write['mb_id'] && $member['mb_id'] == $write['mb_id']))
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
else {
$action = https_url(G5_BBS_DIR).'/password_check.php';
+8 -8
View File
@@ -64,15 +64,15 @@ $mb_8 = isset($_POST['mb_8']) ? trim($_POST['mb_8'])
$mb_9 = isset($_POST['mb_9']) ? trim($_POST['mb_9']) : "";
$mb_10 = isset($_POST['mb_10']) ? trim($_POST['mb_10']) : "";
$mb_name = clean_xss_tags($mb_name);
$mb_name = clean_xss_tags($mb_name, 1, 1);
$mb_email = get_email_address($mb_email);
$mb_homepage = clean_xss_tags($mb_homepage);
$mb_tel = clean_xss_tags($mb_tel);
$mb_homepage = clean_xss_tags($mb_homepage, 1, 1);
$mb_tel = clean_xss_tags($mb_tel, 1, 1);
$mb_zip1 = preg_replace('/[^0-9]/', '', $mb_zip1);
$mb_zip2 = preg_replace('/[^0-9]/', '', $mb_zip2);
$mb_addr1 = clean_xss_tags($mb_addr1);
$mb_addr2 = clean_xss_tags($mb_addr2);
$mb_addr3 = clean_xss_tags($mb_addr3);
$mb_addr1 = clean_xss_tags($mb_addr1, 1, 1);
$mb_addr2 = clean_xss_tags($mb_addr2, 1, 1);
$mb_addr3 = clean_xss_tags($mb_addr3, 1, 1);
$mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '';
run_event('register_form_update_before', $mb_id, $w);
@@ -338,7 +338,7 @@ if ($w == '') {
$sql_nick_date = " , mb_nick_date = '".G5_TIME_YMD."' ";
$sql_open_date = "";
if ($mb_open_default != $mb_open)
if (isset($mb_open_default) && $mb_open_default != $mb_open)
$sql_open_date = " , mb_open_date = '".G5_TIME_YMD."' ";
// 이전 메일주소와 수정한 메일주소가 틀리다면 인증을 다시 해야하므로 값을 삭제
@@ -531,7 +531,7 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
// 신규회원 쿠폰발생
if($w == '' && $default['de_member_reg_coupon_use'] && $default['de_member_reg_coupon_term'] > 0 && $default['de_member_reg_coupon_price'] > 0) {
if($w == '' && isset($default['de_member_reg_coupon_use']) && $default['de_member_reg_coupon_use'] && $default['de_member_reg_coupon_term'] > 0 && $default['de_member_reg_coupon_price'] > 0) {
$j = 0;
$create_coupon = false;
+1 -1
View File
@@ -5,7 +5,7 @@ if (isset($_SESSION['ss_mb_reg']))
$mb = get_member($_SESSION['ss_mb_reg']);
// 회원정보가 없다면 초기 페이지로 이동
if (!$mb['mb_id'])
if (!(isset($mb['mb_id']) && $mb['mb_id']))
goto_url(G5_URL);
$g5['title'] = '회원가입 완료';
+3 -3
View File
@@ -6,8 +6,8 @@ if (get_cookie('ck_visit_ip') != $_SERVER['REMOTE_ADDR'])
{
set_cookie('ck_visit_ip', $_SERVER['REMOTE_ADDR'], 86400); // 하루동안 저장
$tmp_row = sql_fetch(" select max(vi_id) as max_vi_id from {$g5['visit_table']} ");
$vi_id = $tmp_row['max_vi_id'] + 1;
// $tmp_row = sql_fetch(" select max(vi_id) as max_vi_id from {$g5['visit_table']} ");
// $vi_id = $tmp_row['max_vi_id'] + 1;
// $_SERVER 배열변수 값의 변조를 이용한 SQL Injection 공격을 막는 코드입니다. 110810
$remote_addr = escape_trim($_SERVER['REMOTE_ADDR']);
@@ -23,7 +23,7 @@ if (get_cookie('ck_visit_ip') != $_SERVER['REMOTE_ADDR'])
if(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE) {
include_once(G5_BBS_PATH.'/visit_browscap.inc.php');
}
$sql = " insert {$g5['visit_table']} ( vi_id, vi_ip, vi_date, vi_time, vi_referer, vi_agent, vi_browser, vi_os, vi_device ) values ( '{$vi_id}', '{$remote_addr}', '".G5_TIME_YMD."', '".G5_TIME_HIS."', '{$referer}', '{$user_agent}', '{$vi_browser}', '{$vi_os}', '{$vi_device}' ) ";
$sql = " insert {$g5['visit_table']} ( vi_ip, vi_date, vi_time, vi_referer, vi_agent, vi_browser, vi_os, vi_device ) values ( '{$remote_addr}', '".G5_TIME_YMD."', '".G5_TIME_HIS."', '{$referer}', '{$user_agent}', '{$vi_browser}', '{$vi_os}', '{$vi_device}' ) ";
$result = sql_query($sql, FALSE);
// 정상으로 INSERT 되었다면 방문자 합계에 반영
+1 -1
View File
@@ -20,7 +20,7 @@ if (!($w == '' || $w == 'u' || $w == 'r')) {
}
if ($w == 'u' || $w == 'r') {
if ($write['wr_id']) {
if (isset($write['wr_id']) && $write['wr_id']) {
// 가변 변수로 $wr_1 .. $wr_10 까지 만든다.
for ($i=1; $i<=10; $i++) {
$vvar = "wr_".$i;
+1 -1
View File
@@ -685,7 +685,7 @@ sql_query(" delete from {$g5['autosave_table']} where as_uid = '{$uid}' ");
// 비밀글이라면 세션에 비밀글의 아이디를 저장한다. 자신의 글은 다시 비밀번호를 묻지 않기 위함
if ($secret) {
if (! $wr_num) {
if (!(isset($wr_num) && $wr_num)) {
$write = get_write($write_table, $wr_id, true);
$wr_num = $write['wr_num'];
}
+39 -42
View File
@@ -525,7 +525,6 @@ if (isset($_REQUEST['gr_id'])) {
}
//===================================
// 자동로그인 부분에서 첫로그인에 포인트 부여하던것을 로그인중일때로 변경하면서 코드도 대폭 수정하였습니다.
if (isset($_SESSION['ss_mb_id']) && $_SESSION['ss_mb_id']) { // 로그인중이라면
$member = get_member($_SESSION['ss_mb_id']);
@@ -585,6 +584,45 @@ if (isset($_SESSION['ss_mb_id']) && $_SESSION['ss_mb_id']) { // 로그인중이
// 자동로그인 end ---------------------------------------
}
// 최고관리자가 아니면 IP를 체크한다.
if (!(isset($member['mb_id']) && $config['cf_admin'] === $member['mb_id'])) {
// 접근가능 IP
$cf_possible_ip = trim($config['cf_possible_ip']);
if ($cf_possible_ip) {
$is_possible_ip = false;
$pattern = explode("\n", $cf_possible_ip);
for ($i=0; $i<count($pattern); $i++) {
$pattern[$i] = trim($pattern[$i]);
if (empty($pattern[$i]))
continue;
$pattern[$i] = str_replace(".", "\.", $pattern[$i]);
$pattern[$i] = str_replace("+", "[0-9\.]+", $pattern[$i]);
$pat = "/^{$pattern[$i]}$/";
$is_possible_ip = preg_match($pat, $_SERVER['REMOTE_ADDR']);
if ($is_possible_ip)
break;
}
if (!$is_possible_ip)
die ("<meta charset=utf-8>접근이 가능하지 않습니다.");
}
// 접근차단 IP
$is_intercept_ip = false;
$pattern = explode("\n", trim($config['cf_intercept_ip']));
for ($i=0; $i<count($pattern); $i++) {
$pattern[$i] = trim($pattern[$i]);
if (empty($pattern[$i]))
continue;
$pattern[$i] = str_replace(".", "\.", $pattern[$i]);
$pattern[$i] = str_replace("+", "[0-9\.]+", $pattern[$i]);
$pat = "/^{$pattern[$i]}$/";
$is_intercept_ip = preg_match($pat, $_SERVER['REMOTE_ADDR']);
if ($is_intercept_ip)
die ("<meta charset=utf-8>접근 불가합니다.");
}
}
/** @var array $write 글 데이터 */
$write = array();
@@ -637,47 +675,6 @@ if (isset($member['mb_id']) && $member['mb_id']) {
$member['mb_level'] = 1; // 비회원의 경우 회원레벨을 가장 낮게 설정
}
if ($is_admin != 'super') {
// 접근가능 IP
$cf_possible_ip = trim($config['cf_possible_ip']);
if ($cf_possible_ip) {
$is_possible_ip = false;
$pattern = explode("\n", $cf_possible_ip);
for ($i=0; $i<count($pattern); $i++) {
$pattern[$i] = trim($pattern[$i]);
if (empty($pattern[$i]))
continue;
$pattern[$i] = str_replace(".", "\.", $pattern[$i]);
$pattern[$i] = str_replace("+", "[0-9\.]+", $pattern[$i]);
$pat = "/^{$pattern[$i]}$/";
$is_possible_ip = preg_match($pat, $_SERVER['REMOTE_ADDR']);
if ($is_possible_ip)
break;
}
if (!$is_possible_ip)
die ("<meta charset=utf-8>접근이 가능하지 않습니다.");
}
// 접근차단 IP
$is_intercept_ip = false;
$pattern = explode("\n", trim($config['cf_intercept_ip']));
for ($i=0; $i<count($pattern); $i++) {
$pattern[$i] = trim($pattern[$i]);
if (empty($pattern[$i]))
continue;
$pattern[$i] = str_replace(".", "\.", $pattern[$i]);
$pattern[$i] = str_replace("+", "[0-9\.]+", $pattern[$i]);
$pat = "/^{$pattern[$i]}$/";
$is_intercept_ip = preg_match($pat, $_SERVER['REMOTE_ADDR']);
if ($is_intercept_ip)
die ("<meta charset=utf-8>접근 불가합니다.");
}
}
// 테마경로
if(defined('_THEME_PREVIEW_') && _THEME_PREVIEW_ === true)
$config['cf_theme'] = isset($_GET['theme']) ? trim($_GET['theme']) : '';
+6
View File
@@ -24,6 +24,9 @@
var width = $this.width();
$img.each(function() {
if ($(this).attr("loading") === "lazy") return; // loading="lazy" 속성이 있는 경우 건너뜀
if($(this).data("width") == undefined)
$(this).data("width", $(this).width());
@@ -73,6 +76,9 @@
var width = $this.width();
$img.each(function() {
if ($(this).attr("loading") === "lazy") return; // loading="lazy" 속성이 있는 경우 건너뜀
$(this).removeAttr("width")
.removeAttr("height")
.css("width","")
+28 -24
View File
@@ -685,6 +685,10 @@ function html_purifier($html)
)
);
// 커스텀 URI 필터 등록
$def = $config->getDefinition('URI', true); // URI 정의 가져오기
$def->addFilter(new HTMLPurifierContinueParamFilter(), $config); // 커스텀 필터 추가
$purifier = new HTMLPurifier($config);
return run_replace('html_purifier_result', $purifier->purify($html), $purifier, $html);
@@ -1398,15 +1402,14 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
static $cache = array();
$name = get_text($name, 0, true);
if (isset($cache['id:' . $mb_id]) && $cache['id:' . $mb_id]) {
$namekey = ($mb_id && $name) ? $mb_id."\t".$name : '';
// id는 유니크하지만 닉네임 또는 이름은 변경이 가능하다
// name의 경우 비회원은 게시판에 동일한 이름을 등록할수 있다.
if ($namekey && isset($cache['idname:' . $namekey]) && $cache['idname:' . $namekey]) {
return $cache['idname:' . $namekey];
} else if (isset($cache['id:' . $mb_id]) && $cache['id:' . $mb_id]) {
return $cache['id:' . $mb_id];
} else if (
isset($name)
&& isset($cache['name:' . $name])
&& $cache['name:' . $name]
) {
return $cache['name:' . $name];
}
$email = get_string_encrypt($email);
@@ -1520,11 +1523,11 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
$str .= $str2;
$str .= '<noscript class="sv_nojs">' . $str2 . '</noscript>';
$str .= "</span>";
if ($mb_id) {
if ($namekey) {
$cache['idname:' . $namekey] = $str;
} else if ($mb_id && !$name) {
$cache['id:' . $mb_id] = $str;
} else {
$cache['name:' . $name] = $str;
}
return $str;
@@ -4112,15 +4115,9 @@ function safe_replace_regex($str, $str_case=''){
return preg_replace('/[^0-9a-z_\-]/i', '', $str);
}
function get_real_client_ip(){
$real_ip = $_SERVER['REMOTE_ADDR'];
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/', $_SERVER['HTTP_X_FORWARDED_FOR']) ){
$real_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
return preg_replace('/[^0-9.]/', '', $real_ip);
function get_real_client_ip() {
return run_replace('get_real_client_ip', $_SERVER['REMOTE_ADDR']);
}
function check_mail_bot($ip=''){
@@ -4189,7 +4186,14 @@ function is_include_path_check($path='', $is_input='')
if ( $peer_count && $peer_count > $slash_count ){
return false;
}
$dirname_doc_root = !empty($_SERVER['DOCUMENT_ROOT']) ? dirname($_SERVER['DOCUMENT_ROOT']) : dirname(dirname(dirname(__DIR__)));
// 웹서버 폴더만 허용
if ($dirname_doc_root && file_exists($path) && strpos(realpath($path), realpath($dirname_doc_root)) !== 0) {
return false;
}
try {
// whether $path is unix or not
$unipath = strlen($path)==0 || substr($path, 0, 1) != '/';
@@ -4225,8 +4229,8 @@ function is_include_path_check($path='', $is_input='')
//echo 'Caught exception: ', $e->getMessage(), "\n";
return false;
}
if( preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) ){
if (preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) || preg_match('/pear(cmd)?\.php/i', $replace_path)){
return false;
}
if( preg_match('/'.G5_PLUGIN_DIR.'\//i', $replace_path) && (preg_match('/'.G5_OKNAME_DIR.'\//i', $replace_path) || preg_match('/'.G5_KCPCERT_DIR.'\//i', $replace_path) || preg_match('/'.G5_LGXPAY_DIR.'\//i', $replace_path)) || (preg_match('/search\.skin\.php/i', $replace_path) ) ){
+5 -2
View File
@@ -52,9 +52,12 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc=
$mail = run_replace('mail_options', $mail, $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc);
$mail_send_result = $mail->send();
if (!($mail_send_result = $mail->send())) {
throw new Exception($mail->ErrorInfo);
}
} catch (Exception $e) {
error_log("Mail sending error: " . $e->getMessage());
}
run_event('mail_send_result', $mail_send_result, $mail, $to, $cc, $bcc);
+2 -2
View File
@@ -2641,10 +2641,10 @@ function make_order_field($data, $exclude)
if(is_array($value)) {
foreach($value as $k=>$v) {
$field .= '<input type="hidden" name="'.$key.'['.$k.']" value="'.get_text($v).'">'.PHP_EOL;
$field .= '<input type="hidden" name="'.get_text($key.'['.$k.']').'" value="'.get_text($v).'">'.PHP_EOL;
}
} else {
$field .= '<input type="hidden" name="'.$key.'" value="'.get_text($value).'">'.PHP_EOL;
$field .= '<input type="hidden" name="'.get_text($key).'" value="'.get_text($value).'">'.PHP_EOL;
}
}
+3 -3
View File
@@ -130,13 +130,13 @@
</wsdl:binding>
<wsdl:service name="PayService">
<wsdl:port name="PayServiceHttpSoap11Endpoint" binding="ns:PayServiceSoap11Binding">
<soap:address location="https://devpggw.kcp.co.kr:8100/services/KCPPaymentService"/>
<soap:address location="https://testsmpay.kcp.co.kr/services/KCPPaymentService"/>
</wsdl:port>
<wsdl:port name="PayServiceHttpSoap12Endpoint" binding="ns:PayServiceSoap12Binding">
<soap12:address location="https://devpggw.kcp.co.kr:8100/services/KCPPaymentService"/>
<soap12:address location="https://testsmpay.kcp.co.kr/services/KCPPaymentService"/>
</wsdl:port>
<wsdl:port name="PayServiceHttpEndpoint" binding="ns:PayServiceHttpBinding">
<http:address location="https://devpggw.kcp.co.kr:8100/services/KCPPaymentService"/>
<http:address location="https://testsmpay.kcp.co.kr/services/KCPPaymentService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
+2 -2
View File
@@ -54,8 +54,8 @@ echo '<form name="forderform" method="post" action="'.$order_action_url.'" autoc
echo make_order_field($data, $exclude);
echo '<input type="hidden" name="res_cd" value="'.$LGD_RESPCODE.'">'.PHP_EOL;
echo '<input type="hidden" name="LGD_PAYKEY" value="'.$LGD_PAYKEY.'">'.PHP_EOL;
echo '<input type="hidden" name="res_cd" value="'.get_text($LGD_RESPCODE).'">'.PHP_EOL;
echo '<input type="hidden" name="LGD_PAYKEY" value="'.get_text($LGD_PAYKEY).'">'.PHP_EOL;
echo '</form>'.PHP_EOL;
?>
+1 -1
View File
@@ -167,7 +167,7 @@ function getFormObject() {
<form method="post" name="LGD_PAYINFO" id="LGD_PAYINFO" action="">
<?php
foreach ($payReqMap as $key => $value) {
echo'"<input type="hidden" name="'.$key.'" id="'.$key.'" value="'.$value.'">';
echo'"<input type="hidden" name="'.get_text($key).'" id="'.get_text($key).'" value="'.get_text($value).'">';
}
?>
</form>
-6
View File
@@ -361,12 +361,6 @@
<Execution method="windowOpen" value="Embed" />
</Attribute>
</Button>
<Button name="Map" tooltip="지도">
<Attribute class="cheditor-tb-bg" width="23" height="23">
<Icon position="694" width="16" class="cheditor-tb-icon" />
<Execution method="windowOpen" value="GoogleMap" />
</Attribute>
</Button>
</Group>
<Group name="PageBreak">
<Button name="PageBreak" tooltip="인쇄 쪽 나눔">
+26
View File
@@ -77,4 +77,30 @@ if( !class_exists('HTMLPurifier_Filter_Iframevideo') ){
}
}
}
}
if( !class_exists('HTMLPurifierContinueParamFilter') ){
class HTMLPurifierContinueParamFilter extends HTMLPurifier_URIFilter
{
public $name = 'ContinueParamFilter';
public function filter(&$uri, $config, $context)
{
// 쿼리 파라미터 검사
$query = $uri->query;
$path = $uri->path;
if ($path && preg_match('#[\\\\/]logout#i', $path)) {
return false;
}
if ($query) {
if (isset($query_params['continue'])) {
return false;
}
}
return true; // 조건 통과 시 허용
}
}
}
+14 -14
View File
@@ -58,22 +58,22 @@ $g5['title'] = 'KG이니시스 간편인증';
include_once(G5_PATH.'/head.sub.php');
?>
<form name="saForm">
<input type="hidden" name="mid" value="<?php echo $mid ?>"> <!-- 필수 값 -->
<input type="hidden" name="reqSvcCd" value="<?php echo $reqSvcCd ?>"> <!-- 필수 값 -->
<input type="hidden" name="mTxId" value="<?php echo $mTxId ?>"> <!-- 필수 값 -->
<input type="hidden" name="mid" value="<?php echo get_text($mid); ?>"> <!-- 필수 값 -->
<input type="hidden" name="reqSvcCd" value="<?php echo get_text($reqSvcCd); ?>"> <!-- 필수 값 -->
<input type="hidden" name="mTxId" value="<?php echo get_text($mTxId); ?>"> <!-- 필수 값 -->
<input type="hidden" name="authHash" value="<?php echo $authHash ?>"> <!-- 필수 값 -->
<input type="hidden" name="flgFixedUser" value="<?php echo $flgFixedUser ?>"> <!-- 필수 값 Y/N 특정사용자 인증 요청 여부 -->
<input type="hidden" name="userName" value="<?php echo $userName ?>">
<input type="hidden" name="userPhone" value="<?php echo $userPhone ?>">
<input type="hidden" name="userBirth" value="<?php echo $userBirth ?>">
<input type="hidden" name="userHash" value="<?php echo $userHash ?>">
<input type="hidden" name="reservedMsg" value="<?php echo $reservedMsg; ?>">
<input type="hidden" name="mbId" value="<?php echo $member['mb_id']; ?>">
<input type="hidden" name="directAgency" value="<?php echo isset($_GET['directAgency']) ? clean_xss_tags($_GET['directAgency'], 1, 1) : ''; ?>">
<input type="hidden" name="authHash" value="<?php echo get_text($authHash); ?>"> <!-- 필수 값 -->
<input type="hidden" name="flgFixedUser" value="<?php echo get_text($flgFixedUser); ?>"> <!-- 필수 값 Y/N 특정사용자 인증 요청 여부 -->
<input type="hidden" name="userName" value="<?php echo get_text($userName); ?>">
<input type="hidden" name="userPhone" value="<?php echo get_text($userPhone); ?>">
<input type="hidden" name="userBirth" value="<?php echo get_text($userBirth); ?>">
<input type="hidden" name="userHash" value="<?php echo get_text($userHash); ?>">
<input type="hidden" name="reservedMsg" value="<?php echo get_text($reservedMsg); ?>">
<input type="hidden" name="mbId" value="<?php echo get_text($member['mb_id']); ?>">
<input type="hidden" name="directAgency" value="<?php echo isset($_GET['directAgency']) ? get_text(clean_xss_tags($_GET['directAgency'], 1, 1)) : ''; ?>">
<input type="hidden" name="successUrl" value="<?php echo $resultUrl; ?>"> <!-- 필수 값 -->
<input type="hidden" name="failUrl" value="<?php echo $resultUrl; ?>"> <!-- 필수 값 -->
<input type="hidden" name="successUrl" value="<?php echo get_text($resultUrl); ?>"> <!-- 필수 값 -->
<input type="hidden" name="failUrl" value="<?php echo get_text($resultUrl); ?>"> <!-- 필수 값 -->
<!-- successUrl / failUrl 은 분리 하여 이용가능!-->
</form>
<script>
+1 -1
View File
@@ -111,7 +111,7 @@ $ct_cert->mf_clear();
<input type="hidden" name="param_opt_2" value="opt2"/>
<input type="hidden" name="param_opt_3" value="opt3"/>
<?php if ($config['cf_cert_kcp_enckey']) { ?>
<?php if ($config['cf_cert_kcp_enckey'] || $kcp_enc_key) { ?>
<!-- 리턴 암호화 고도화 -->
<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 ); ?>"/>
+1 -1
View File
@@ -59,7 +59,7 @@ $payReqMap = $_SESSION['lgd_certify'];//결제 요청시, Session에 저장했
foreach ($payReqMap as $key => $value) {
$key = htmlspecialchars(strip_tags($key));
$value = htmlspecialchars(strip_tags($value));
echo "<input type='hidden' name='$key' id='$key' value='$value'>";
echo "<input type='hidden' name='".get_text($key)."' id='".get_text($key)."' value='".get_text($value)."'>";
}
?>
</form>
+9 -7
View File
@@ -22,18 +22,20 @@
Contact @<a href='http://twitter.com/abraham'>abraham</a>
</p>
<hr />
<?php if (isset($menu)) { ?>
<?php echo $menu; ?>
<?php if (isset($menu) && is_string($menu)) { ?>
<?php echo htmlspecialchars($menu, ENT_QUOTES, 'UTF-8'); ?>
<?php } ?>
</div>
<?php if (isset($status_text)) { ?>
<?php echo '<h3>'.$status_text.'</h3>'; ?>
<?php if (isset($status_text) && is_string($status_text)) { ?>
<?php echo '<h3>'.htmlspecialchars($status_text, ENT_QUOTES, 'UTF-8').'</h3>'; ?>
<?php } ?>
<p>
<div>
<pre>
<?php print_r($content); ?>
<?php if (isset($content) && (is_array($content) || is_object($content))) {
echo htmlspecialchars(json_encode($content, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES), ENT_QUOTES, 'UTF-8');
} ?>
</pre>
</p>
</div>
</body>
</html>
+35 -14
View File
@@ -3,9 +3,12 @@ include_once('./_common.php');
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
require_once(G5_SHOP_PATH.'/inicis/libs/HttpClient.php');
require_once(G5_SHOP_PATH.'/inicis/libs/json_lib.php');
require_once(G5_SHOP_PATH.'/inicis/libs/properties.php');
$inicis_pay_result = false;
$prop = new properties();
try {
//#############################
@@ -37,6 +40,18 @@ try {
///$mKey = $util->makeHash(signKey, "sha256"); // 가맹점 확인을 위한 signKey를 해시값으로 변경 (SHA-256방식 사용)
$mKey = hash("sha256", $signKey);
//##########################################################################
// 승인요청 API url (authUrl) 리스트 는 properties 에 세팅하여 사용합니다.
// idc_name 으로 수신 받은 센터 네임을 properties 에서 include 하여 승인요청하시면 됩니다.
//##########################################################################
$idc_name = $_REQUEST["idc_name"];
$authUrl = $prop->getAuthUrl($idc_name);
if (strcmp($authUrl, $_REQUEST["authUrl"]) != 0) {
die("authUrl check Fail\n");
}
//#####################
// 2.signature 생성
//#####################
@@ -172,22 +187,28 @@ try {
//#####################
$netcancelResultString = ""; // 망취소 요청 API url(고정, 임의 세팅 금지)
if ($httpUtil->processHTTP($netCancel, $authMap)) {
$netcancelResultString = $httpUtil->body;
} else {
echo "Http Connect Error\n";
echo $httpUtil->errormsg;
$netCancel = $prop->getNetCancel($idc_name);
if (strcmp($netCancel, $_REQUEST["netCancelUrl"]) == 0) {
if ($httpUtil->processHTTP($netCancel, $authMap)) {
$netcancelResultString = $httpUtil->body;
} else {
echo "Http Connect Error\n";
echo $httpUtil->errormsg;
throw new Exception("Http Connect Error");
throw new Exception("Http Connect Error");
}
echo "<br/>## 망취소 API 결과 ##<br/>";
/*##XML output##*/
//$netcancelResultString = str_replace("<", "&lt;", $$netcancelResultString);
//$netcancelResultString = str_replace(">", "&gt;", $$netcancelResultString);
// 취소 결과 확인
echo "<p>". $netcancelResultString . "</p>";
}
echo "## 망취소 API 결과 ##";
$netcancelResultString = str_replace("<", "&lt;", $$netcancelResultString);
$netcancelResultString = str_replace(">", "&gt;", $$netcancelResultString);
echo "<pre>", $netcancelResultString . "</pre>";
// 취소 결과 확인
}
} else {
+42
View File
@@ -0,0 +1,42 @@
<?php
class properties {
function getAuthUrl($idc_name) {
$url = "stdpay.inicis.com/api/payAuth";
switch ($idc_name) {
case 'fc':
$authUrl = "https://fc".$url;
break;
case 'ks':
$authUrl = "https://ks".$url;
break;
case 'stg':
$authUrl = "https://stg".$url;
break;
default:
break;
}
return $authUrl;
}
function getNetCancel($idc_name) {
$url = "stdpay.inicis.com/api/netCancel";
switch ($idc_name) {
case 'fc':
$netCancel = "https://fc".$url;
break;
case 'ks':
$netCancel = "https://ks".$url;
break;
case 'stg':
$netCancel = "https://stg".$url;
break;
default:
break;
}
return $netCancel;
}
}
?>
+1 -1
View File
@@ -46,7 +46,7 @@ $payReqMap = $_SESSION['PAYREQ_MAP'];//결제 요청시, Session에 저장했던
<form method="post" name="LGD_RETURNINFO" id="LGD_RETURNINFO">
<?php
foreach ($payReqMap as $key => $value) {
echo "<input type='hidden' name='$key' id='$key' value='$value'>";
echo "<input type='hidden' name='".get_text($key)."' id='".get_text($key)."' value='".get_text($value)."'>";
}
?>
</form>
+1 -1
View File
@@ -81,7 +81,7 @@ if ($xpay->TX()) {
$app_time = $xpay->Response('LGD_PAYDATE',0);
$bank_name = $bankname = $xpay->Response('LGD_FINANCENAME',0);
$depositor = $xpay->Response('LGD_PAYER',0);
$account = $xpay->Response('LGD_FINANCENAME',0).' '.$xpay->Response('LGD_ACCOUNTNUM',0).' '.$xpay->Response('LGD_SAOWNER',0);
$account = $xpay->Response('LGD_ACCOUNTNUM',0).' '.$xpay->Response('LGD_SAOWNER',0);
$commid = $xpay->Response('LGD_FINANCENAME',0);
$mobile_no = $xpay->Response('LGD_TELNO',0);
$app_no = $od_app_no = $xpay->Response('LGD_FINANCEAUTHNUM',0);
+1 -1
View File
@@ -57,7 +57,7 @@ $cardQuotaBase = '2:3:4:5:6:7:8:9:10:11:12'; // 가맹점에서 사용할 할
$inicis_cardpoint = $default['de_inicis_cartpoint_use'] ? ':cardpoint' : ''; //신용카드 포인트 결제에 관한 옵션 ( 신청해야 함 )
$acceptmethod = 'HPP(2):no_receipt:vbank('.date('Ymd', strtotime("+3 days", G5_SERVER_TIME)).'):below1000'.$useescrow.$inicis_cardpoint;
$acceptmethod = 'HPP(2):no_receipt:vbank('.date('Ymd', strtotime("+3 days", G5_SERVER_TIME)).'):below1000:centerCd(Y)'.$useescrow.$inicis_cardpoint;
/* 기타 */
$siteDomain = G5_SHOP_URL.'/inicis'; //가맹점 도메인 입력
+12 -3
View File
@@ -14,10 +14,19 @@ $INIpayLog = false; // 로그를 기록하려면 true 로 수
//**********************************************************************************
$PG_IP = get_real_client_ip();
$allowed_ips = array(
"203.238.37.3", // TX5, TX4
"203.238.37.15", // PC가상계좌(노티), 모바일 가상계좌, 에스크로
"203.238.37.16", //
"203.238.37.25", //
"203.238.37.32", // 에스크로
"183.109.71.153", // PC가상계좌(노티), 모바일(노티), 에스크로
"118.129.210.25", // 모바일(노티)
"39.115.212.9" // PC가상계좌(노티)
);
if (in_array($_SERVER['REMOTE_ADDR'], $allowed_ips)) { //PG에서 보냈는지 IP로 체크
if( $PG_IP == "203.238.37.3" || $PG_IP == "203.238.37.15" || $PG_IP == "203.238.37.16" || $PG_IP == "203.238.37.25" || $PG_IP == "183.109.71.153" || $PG_IP == "39.115.212.9" ) //PG에서 보냈는지 IP로 체크
{
$msg_id = $msg_id; //메세지 타입
$no_tid = $no_tid; //거래번호
$no_oid = $no_oid; //상점 주문번호
+1 -1
View File
@@ -2,7 +2,7 @@
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.6.9');
define('G5_GNUBOARD_VER', '5.6.14');
// 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전을 합쳐서 그누보드5.4.6 버전에서 시작함 (kagla-210617)
// G5_YOUNGCART_VER 이 상수를 사용하는 곳이 있으므로 주석 처리 해제함
// 그누보드5.4.6 이상 버전 부터는 영카트를 그누보드에 포함하여 배포하므로 영카트5의 버전은 의미가 없습니다.