Merge branch 'gnuboard:master' into master

This commit is contained in:
수영
2022-04-21 13:48:55 +09:00
committed by GitHub
18 changed files with 126 additions and 87 deletions

View File

@ -157,7 +157,6 @@ else {
<form name="fcategoryform" action="./categoryformupdate.php" onsubmit="return fcategoryformcheck(this);" method="post" enctype="multipart/form-data">
<input type="hidden" name="codedup" value="<?php echo $default['de_code_dup_use']; ?>">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
<input type="hidden" name="sod" value="<?php echo $sod; ?>">
@ -184,7 +183,6 @@ else {
<?php if ($w == "") { ?>
<?php echo help("자동으로 보여지는 분류코드를 사용하시길 권해드리지만 직접 입력한 값으로도 사용할 수 있습니다.\n분류코드는 나중에 수정이 되지 않으므로 신중하게 결정하여 사용하십시오.\n\n분류코드는 2자리씩 10자리를 사용하여 5단계를 표현할 수 있습니다.\n0~z까지 입력이 가능하며 한 분류당 최대 1296가지를 표현할 수 있습니다.\n그러므로 총 3656158440062976가지의 분류를 사용할 수 있습니다."); ?>
<input type="text" name="ca_id" value="<?php echo $subid; ?>" id="ca_id" required class="required frm_input" size="<?php echo $sublen; ?>" maxlength="<?php echo $sublen; ?>">
<!-- <?php if ($default['de_code_dup_use']) { ?><a href="javascript:;" onclick="codedupcheck(document.getElementById('ca_id').value)">코드 중복검사</a><?php } ?> -->
<?php } else { ?>
<input type="hidden" name="ca_id" value="<?php echo $ca['ca_id']; ?>">
<span class="frm_ca_id"><?php echo $ca['ca_id']; ?></span>

View File

@ -1,24 +0,0 @@
<?php
include_once('./_common.php');
$it_id = isset($it_id) ? clean_xss_tags(trim($it_id)) : '';
$ca_id = isset($ca_id) ? clean_xss_tags(trim($ca_id)) : '';
$code = '';
$name = '';
if ($it_id)
{
$row = get_shop_item($it_id, true);
$code = $it_id;
$name = $row['it_name'];
}
else if ($ca_id)
{
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$row = sql_fetch($sql);
$code = $ca_id;
$name = $row['ca_name'];
}
echo '{ "code": "' . $code . '", "name": "' . $name . '" }';

View File

@ -1398,13 +1398,6 @@ if(!$default['de_kakaopay_cancelpwd']){
<?php echo get_member_level_select('de_level_sell', 1, 10, $default['de_level_sell']); ?>
</td>
</tr>
<tr>
<th scope="row"><label for="de_code_dup_use">코드 중복검사</label></th>
<td>
<?php echo help("분류, 상품 등을 추가할 때 자동으로 코드 중복검사를 하려면 체크하십시오."); ?>
<input type="checkbox" name="de_code_dup_use" value="1" id="de_code_dup_use"<?php echo $default['de_code_dup_use']?' checked':''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="de_cart_keep_term">장바구니 보관기간</label></th>
<td>

View File

@ -210,7 +210,6 @@ if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false)
<form name="fitemform" action="./itemformupdate.php" method="post" enctype="MULTIPART/FORM-DATA" autocomplete="off" onsubmit="return fitemformcheck(this)">
<input type="hidden" name="codedup" value="<?php echo $default['de_code_dup_use']; ?>">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="sst" value="<?php echo $sst; ?>">
@ -333,11 +332,8 @@ if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false)
<th scope="row">상품코드</th>
<td colspan="2">
<?php if ($w == '') { // 추가 ?>
<!-- 최근에 입력한 코드(자동 생성시)가 목록의 상단에 출력되게 하려면 아래의 코드로 대체하십시오. -->
<!-- <input type=text class=required name=it_id value="<?php echo 10000000000-time()?>" size=12 maxlength=10 required> <a href='javascript:;' onclick="codedupcheck(document.all.it_id.value)"><img src='./img/btn_code.gif' border=0 align=absmiddle></a> -->
<?php echo help("상품의 코드는 10자리 숫자로 자동생성합니다. <b>직접 상품코드를 입력할 수도 있습니다.</b>\n상품코드는 영문자, 숫자, - 만 입력 가능합니다."); ?>
<input type="text" name="it_id" value="<?php echo time(); ?>" id="it_id" required class="frm_input required" size="20" maxlength="20">
<!-- <?php if ($default['de_code_dup_use']) { ?><button type="button" class="btn_frmline" onclick="codedupcheck(document.all.it_id.value)">중복검사</a><?php } ?> -->
<?php } else { ?>
<input type="hidden" name="it_id" value="<?php echo $it['it_id']; ?>">
<span class="frm_ca_id"><?php echo $it['it_id']; ?></span>
@ -1782,35 +1778,6 @@ $(function() {
});
<?php } ?>
function codedupcheck(id)
{
if (!id) {
alert('상품코드를 입력하십시오.');
f.it_id.focus();
return;
}
var it_id = id.replace(/[A-Za-z0-9\-_]/g, "");
if(it_id.length > 0) {
alert("상품코드는 영문자, 숫자, -, _ 만 사용할 수 있습니다.");
return false;
}
$.post(
"./codedupcheck.php",
{ it_id: id },
function(data) {
if(data.name) {
alert("코드 '"+data.code+"' 는 '".data.name+"' (으)로 이미 등록되어 있으므로\n\n사용하실 수 없습니다.");
return false;
} else {
alert("'"+data.code+"' 은(는) 등록된 코드가 없으므로 사용하실 수 있습니다.");
document.fitemform.codedup.value = '';
}
}, "json"
);
}
function fitemformcheck(f)
{
if (!f.ca_id.value) {

View File

@ -1,27 +1,31 @@
<?php
include_once('./_common.php');
if($w == '')
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
else
alert('잘못된 접근입니다', G5_URL);
$mb_id = isset($_SESSION['ss_cert_mb_id']) ? trim(get_session('ss_cert_mb_id')) : '';
$mb_dupinfo = isset($_SESSION['ss_cert_dupinfo']) ? trim(get_session('ss_cert_dupinfo')) : '';
if(!$mb_id)
alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.');
if(!$mb_id) alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.', G5_URL);
if(!$mb_dupinfo) alert('잘못된 접근입니다.', G5_URL);
$mb_check = sql_fetch("select * from {$g5['member_table']} where mb_id = '{$mb_id}' AND mb_dupinfo = '{$mb_dupinfo}'");
if(!$mb_check) alert('잘못된 접근입니다.', G5_URL);
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password_re']) : '';
$mb_password_re = isset($_POST['mb_password_re']) ? trim($_POST['mb_password_re']) : '';
if ($w == '' && !$mb_password)
alert('비밀번호가 넘어오지 않았습니다.');
if($w == '' && $mb_password != $mb_password_re)
alert('비밀번호가 일치하지 않습니다.');
if (!$mb_password)
alert('비밀번호가 넘어오지 않았습니다.');
if ($mb_password != $mb_password_re)
alert('비밀번호가 일치하지 않습니다.');
$sql_password = "";
if ($mb_password)
$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
sql_query("update {$g5['member_table']} set {$sql_password} where mb_id = '{$mb_id}'");
sql_query("update {$g5['member_table']} set {$sql_password} where mb_id = '{$mb_id}' AND mb_dupinfo = '{$mb_dupinfo}'");
set_session('ss_cert_mb_id', '');
set_session('ss_cert_dupinfo', '');
goto_url(G5_BBS_URL.'/login.php');

View File

@ -3337,6 +3337,11 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
if(!$msg)
$msg = 'url에 타 도메인을 지정할 수 없습니다.';
// KVE-2021-1277 Open Redirect 취약점 해결
if (preg_match('#\\\0#', $url)) {
alert('url 에 올바르지 않은 값이 포함되어 있습니다.');
}
$url = urldecode($url);
$p = @parse_url(trim($url));
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);

View File

@ -1,5 +1,7 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once('./_common.php');
if (!defined('_SHOP_COMMON_')) exit; // 모바일 페이지로 직접 접근하는 것을 막음
$ev_id = isset($_GET['ev_id']) ? (int) $_GET['ev_id'] : 0;

View File

@ -12,7 +12,8 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
<fieldset id="info_fs">
<p>새로운 비밀번호를 입력해주세요.</p>
<label for="mb_id" class="sound_only">아이디</label>
<input type="text" name="mb_id" id="mb_id" value="<?php echo $_POST['mb_id']; ?>" required class="required frm_input full_input" size="30" placeholder="아이디" readonly>
<br>
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

View File

@ -50,6 +50,22 @@ if ($_POST["resultCode"] === "0000") {
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
exit;
}
$md5_cert_no = md5($cert_no);
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
set_session("ss_cert_type", $cert_type);
set_session("ss_cert_no", $md5_cert_no);
set_session("ss_cert_hash", $hash_data);
set_session("ss_cert_adult", $adult);
set_session("ss_cert_birth", $birth_day);
//set_session("ss_cert_sex", ($sex_code=="01"?"M":"F")); // 이니시스 간편인증은 성별정보 리턴 없음
set_session('ss_cert_dupinfo', $mb_dupinfo);
set_session('ss_cert_mb_id', $row['mb_id']);
} else {
// 인증실패 curl의 인증실패 체크
alert_close('코드 : '.$res_data['resultCode'].' '.urldecode($res_data['resultMsg']));

View File

@ -159,7 +159,25 @@ if( $cert_enc_use == "Y" )
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
exit;
}
}else{
$mb_dupinfo = $md5_ci;
}
$md5_cert_no = md5($cert_no);
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
set_session("ss_cert_type", $cert_type);
set_session("ss_cert_no", $md5_cert_no);
set_session("ss_cert_hash", $hash_data);
set_session("ss_cert_adult", $adult);
set_session("ss_cert_birth", $birth_day);
set_session("ss_cert_sex", ($sex_code=="01"?"M":"F")); // 이니시스 간편인증은 성별정보 리턴 없음
set_session('ss_cert_dupinfo', $mb_dupinfo);
set_session('ss_cert_mb_id', $row['mb_id']);
}
else if( $res_cd != "0000" )
{

View File

@ -136,8 +136,25 @@ if ($xpay->TX()) {
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
exit;
}
}else{
$mb_dupinfo = $md5_ci;
}
$md5_cert_no = md5($cert_no);
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
set_session("ss_cert_type", $cert_type);
set_session("ss_cert_no", $md5_cert_no);
set_session("ss_cert_hash", $hash_data);
set_session("ss_cert_adult", $adult);
set_session("ss_cert_birth", $birth_day);
set_session("ss_cert_sex", $mb_sex); // 이니시스 간편인증은 성별정보 리턴 없음
set_session('ss_cert_dupinfo', $mb_dupinfo);
set_session('ss_cert_mb_id', $row['mb_id']);
} else {
//인증요청 결과 실패 DB처리
//echo "인증요청 결과 실패 DB처리하시기 바랍니다.<br>";

View File

@ -121,8 +121,26 @@ if (empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
exit;
}
}else{
$mb_dupinfo = $md5_ci;
}
$md5_cert_no = md5($cert_no);
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
set_session("ss_cert_type", $cert_type);
set_session("ss_cert_no", $md5_cert_no);
set_session("ss_cert_hash", $hash_data);
set_session("ss_cert_adult", $adult);
set_session("ss_cert_birth", $birth_day);
set_session('ss_cert_sex', ($field[9] == 1 ? 'M' : 'F'));
set_session('ss_cert_dupinfo', $mb_dupinfo);
set_session('ss_cert_mb_id', $row['mb_id']);
$g5['title'] = 'KCB 휴대폰 본인확인';
include_once(G5_PATH.'/head.sub.php');
?>

View File

@ -95,7 +95,26 @@ if (empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
exit;
}
}else{
$mb_dupinfo = $md5_ci;
}
$md5_cert_no = md5($cert_no);
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
set_session("ss_cert_type", $cert_type);
set_session("ss_cert_no", $md5_cert_no);
set_session("ss_cert_hash", $hash_data);
set_session("ss_cert_adult", $adult);
set_session("ss_cert_birth", $birth_day);
set_session('ss_cert_sex', ($field[9] == 1 ? 'M' : 'F'));
set_session('ss_cert_dupinfo', $mb_dupinfo);
set_session('ss_cert_mb_id', $row['mb_id']);
$g5['title'] = 'KCB 아이핀 본인확인';
include_once(G5_PATH.'/head.sub.php');
?>

View File

@ -17,4 +17,6 @@ if (isset($_REQUEST['sortodr'])) {
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
define('_SHOP_', true);
define('_SHOP_', true);
define('_SHOP_COMMON_', true); // 모바일 페이지의 직접 접근을 막는 경우에 사용
?>

View File

@ -12,7 +12,8 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
<fieldset id="info_fs">
<p>새로운 비밀번호를 입력해주세요.</p>
<label for="mb_id" class="sound_only">아이디</label>
<input type="text" name="mb_id" id="mb_id" value="<?php echo $_POST['mb_id']; ?>" required class="required frm_input full_input" size="30" placeholder="아이디" readonly>
<br>
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

View File

@ -12,7 +12,8 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
<fieldset id="info_fs">
<p>새로운 비밀번호를 입력해주세요.</p>
<label for="mb_id" class="sound_only">아이디</label>
<input type="text" name="mb_id" id="mb_id" value="<?php echo $_POST['mb_id']; ?>" required class="required frm_input full_input" size="30" placeholder="아이디" readonly>
<br>
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

View File

@ -12,7 +12,8 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
<fieldset id="info_fs">
<p>새로운 비밀번호를 입력해주세요.</p>
<label for="mb_id" class="sound_only">아이디</label>
<input type="text" name="mb_id" id="mb_id" value="<?php echo $_POST['mb_id']; ?>" required class="required frm_input full_input" size="30" placeholder="아이디" readonly>
<br>
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

View File

@ -2,7 +2,7 @@
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.5.4');
define('G5_GNUBOARD_VER', '5.5.6');
// 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전을 합쳐서 그누보드5.4.6 버전에서 시작함 (kagla-210617)
// G5_YOUNGCART_VER 이 상수를 사용하는 곳이 있으므로 주석 처리 해제함
// 그누보드5.4.6 이상 버전 부터는 영카트를 그누보드에 포함하여 배포하므로 영카트5의 버전은 의미가 없습니다.