Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa88ff68a1 | ||
|
|
07a0245f85 | ||
|
|
d3de613a8c | ||
|
|
bb1f69e86c | ||
|
|
dc4c2a79d9 | ||
|
|
38451a7d3d | ||
|
|
87d11d5c78 | ||
|
|
c1bbce1114 | ||
|
|
61576d3e87 | ||
|
|
c9100d2e38 | ||
|
|
7714153faf | ||
|
|
654fd7ba68 | ||
|
|
ea9f618de8 | ||
|
|
eea5a2477b | ||
|
|
8cc101b617 | ||
|
|
316d3542a9 | ||
|
|
c2da219473 | ||
|
|
6874e767c2 | ||
|
|
5a91d37365 | ||
|
|
f9c972d866 | ||
|
|
ada8f28aae | ||
|
|
11afc52b84 | ||
|
|
d9c3f0e66c | ||
|
|
49da5c33df | ||
|
|
29250f264a | ||
|
|
df00641290 | ||
|
|
a05a1403f5 | ||
|
|
c5817594d0 | ||
|
|
68a9e45337 | ||
|
|
b8da0f0890 | ||
|
|
62ff45b31f | ||
|
|
918ad48675 | ||
|
|
e5128bf02e |
+10
-1
@@ -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
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
@@ -117,6 +117,15 @@ if ($new == 'new' || !$code) {
|
||||
});
|
||||
});
|
||||
|
||||
function htmlEscape(str) {
|
||||
return str
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
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>";
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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']}` ");
|
||||
}
|
||||
}
|
||||
|
||||
// 설정일이 지난 쪽지 삭제
|
||||
|
||||
@@ -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', '');
|
||||
|
||||
@@ -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
@@ -1,7 +1,11 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$html_title = '링크 > '.conv_subject($write['wr_subject'], 255);
|
||||
$html_title = '링크';
|
||||
|
||||
if (isset($write['wr_subject']) && $write['wr_subject']) {
|
||||
$html_title .= ' > '.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
@@ -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.'&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.'&wr_id='.$wr_id));
|
||||
else {
|
||||
$action = https_url(G5_BBS_DIR).'/password_check.php';
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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'] = '회원가입 완료';
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -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
@@ -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']) : '';
|
||||
|
||||
@@ -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","")
|
||||
|
||||
+17
-12
@@ -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);
|
||||
@@ -4111,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=''){
|
||||
@@ -4188,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) != '/';
|
||||
@@ -4224,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) ) ){
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
?>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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="인쇄 쪽 나눔">
|
||||
|
||||
@@ -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; // 조건 통과 시 허용
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
@@ -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 ); ?>"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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("<", "<", $$netcancelResultString);
|
||||
//$netcancelResultString = str_replace(">", ">", $$netcancelResultString);
|
||||
|
||||
// 취소 결과 확인
|
||||
echo "<p>". $netcancelResultString . "</p>";
|
||||
}
|
||||
|
||||
echo "## 망취소 API 결과 ##";
|
||||
|
||||
$netcancelResultString = str_replace("<", "<", $$netcancelResultString);
|
||||
$netcancelResultString = str_replace(">", ">", $$netcancelResultString);
|
||||
|
||||
echo "<pre>", $netcancelResultString . "</pre>";
|
||||
// 취소 결과 확인
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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>
|
||||
|
||||
@@ -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'; //가맹점 도메인 입력
|
||||
|
||||
@@ -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
@@ -2,7 +2,7 @@
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.6.10');
|
||||
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의 버전은 의미가 없습니다.
|
||||
|
||||
Reference in New Issue
Block a user