본인인증 : 전체 모듈 php8 호환 코드 추가, 스위치문 개선
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
global $g5;
|
||||
$_POST['mb_id'];
|
||||
|
||||
if($w == '')
|
||||
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
|
||||
else
|
||||
@ -23,6 +22,6 @@ $sql_password = "";
|
||||
if ($mb_password)
|
||||
$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
|
||||
|
||||
sql_fetch("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}'");
|
||||
|
||||
goto_url(G5_BBS_URL.'/login.php');
|
||||
@ -153,9 +153,9 @@ if( $cert_enc_use == "Y" )
|
||||
$md5_ci = md5($ci.$ci);
|
||||
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$md5_ci}'"); // ci데이터로 찾음
|
||||
if (!$row['mb_id']) { // ci로 등록된 계정이 없다면
|
||||
if (empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // di데이터로 찾음
|
||||
if (!$row['mb_id']) { // di로 등록된 계정도 없다면
|
||||
if (empty($row['mb_id'])) { // di로 등록된 계정도 없다면
|
||||
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -9,10 +9,12 @@ setlocale(LC_CTYPE, 'ko_KR.euc-kr');
|
||||
switch($_GET['pageType']){ // 페이지 타입 체크
|
||||
case "register":
|
||||
$resultPage = "/kcpcert_result.php";
|
||||
break;
|
||||
break;
|
||||
case "find":
|
||||
$resultPage = "/find_kcpcert_result.php";
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
alert_close('잘못된 접근입니다.');
|
||||
}
|
||||
|
||||
// kcp 휴대폰인증파일
|
||||
|
||||
@ -153,7 +153,7 @@ if( $cert_enc_use == "Y" )
|
||||
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id']) {
|
||||
if (!empty($row['mb_id'])) {
|
||||
alert_close("입력하신 본인확인 정보로 가입된 내역이 존재합니다.\\n회원아이디 : ".$row['mb_id']);
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
$mb_dupinfo = $md5_ci;
|
||||
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // ci데이터로 찾음
|
||||
if(!$row['mb_id']) { // ci로 등록된 계정이 없다면
|
||||
if(empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
|
||||
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -43,10 +43,12 @@
|
||||
switch($_GET['pageType']){
|
||||
case "register":
|
||||
$resultPage = "/kg_result.php";
|
||||
break;
|
||||
break;
|
||||
case "find":
|
||||
$resultPage = "/kg_find_result.php";
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
alert_close('잘못된 접근입니다.');
|
||||
}
|
||||
|
||||
$resultUrl = G5_KGCERT_URL . $resultPage;
|
||||
|
||||
@ -7,10 +7,12 @@ certify_count_check($member['mb_id'], 'hp');
|
||||
switch($_GET['pageType']){ // 페이지 타입 체크
|
||||
case "register":
|
||||
$resultPage = "/AuthOnlyRes.php";
|
||||
break;
|
||||
break;
|
||||
case "find":
|
||||
$resultPage = "/find_AuthOnlyRes.php";
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
alert_close('잘못된 접근입니다.');
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -130,9 +130,9 @@ if ($xpay->TX()) {
|
||||
$md5_ci = md5($ci.$ci);
|
||||
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$md5_ci}'"); // ci데이터로 찾음
|
||||
if (!$row['mb_id']) { // ci로 등록된 계정이 없다면
|
||||
if (empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // di데이터로 찾음
|
||||
if(!$row['mb_id']) {
|
||||
if(empty($row['mb_id'])) {
|
||||
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -115,9 +115,9 @@ $phone_no = hyphen_hp_number($req_num);
|
||||
$md5_ci = md5($ci.$ci);
|
||||
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$md5_ci}'"); // ci데이터로 찾음
|
||||
if (!$row['mb_id']) { // ci로 등록된 계정이 없다면
|
||||
if (empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // di데이터로 찾음
|
||||
if(!$row['mb_id']) {
|
||||
if(empty($row['mb_id'])) {
|
||||
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -89,9 +89,9 @@ if(!empty($field[1])) { // 아이핀은 리턴받는 ci 데이터가 두가지
|
||||
$md5_ci = md5($ci.$ci);
|
||||
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$md5_ci}'"); // ci데이터로 찾음
|
||||
if (!$row['mb_id']) { // ci로 등록된 계정이 없다면
|
||||
if (empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
|
||||
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // di데이터로 찾음
|
||||
if(!$row['mb_id']) {
|
||||
if(empty($row['mb_id'])) {
|
||||
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -80,4 +80,5 @@ if($config['cf_cert_use'] == 2) {
|
||||
// ########################################################################
|
||||
// # 리턴 URL 설정
|
||||
// ########################################################################
|
||||
if(!empty($resultPage))
|
||||
$returnUrl = escapeshellarg(G5_OKNAME_URL.$resultPage); // 본인인증 완료후 리턴될 URL (도메인 포함 full path);
|
||||
@ -17,10 +17,12 @@ certify_count_check($member['mb_id'], 'hp');
|
||||
switch($_GET['pageType']){
|
||||
case "register":
|
||||
$resultPage = "/hpcert2.php";
|
||||
break;
|
||||
break;
|
||||
case "find":
|
||||
$resultPage = "/find_hpcert2.php";
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
alert_close('잘못된 접근입니다.');
|
||||
}
|
||||
// KISA 취약점 내용(KVE-2018-0291) hpcert1.php의 $cmd 함수에 대한 인자 값은 hpcert_config.php 파일에서 설정되나, 이를 다른 페이지에서 포함한 뒤 호출할 시 임의 값 설정 가능
|
||||
// 이에 include_once 를 require 로 수정함
|
||||
|
||||
@ -116,7 +116,7 @@ $phone_no = hyphen_hp_number($req_num);
|
||||
// 중복정보 체크
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id']) {
|
||||
if (!empty($row['mb_id'])) {
|
||||
alert_close("입력하신 본인확인 정보로 가입된 내역이 존재합니다.\\n회원아이디 : ".$row['mb_id']);
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ set_session('ss_cert_adult', $adult);
|
||||
set_session('ss_cert_birth', $mb_birth);
|
||||
set_session('ss_cert_sex', ($field[9] == 1 ? 'M' : 'F'));
|
||||
set_session('ss_cert_dupinfo', $mb_dupinfo);
|
||||
|
||||
die;
|
||||
$g5['title'] = 'KCB 휴대폰 본인확인';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
@ -36,6 +36,7 @@ if($config['cf_cert_use'] == 2) {
|
||||
}
|
||||
|
||||
$idpCode = 'V';
|
||||
if(!empty($resultPage))
|
||||
$returnUrl = G5_OKNAME_URL.$resultPage; // 아이핀 인증을 마치고 돌아올 페이지 주소
|
||||
$keypath = G5_OKNAME_PATH.'/key/okname.key'; // 키파일이 생성될 위치. 웹서버에 해당파일을 생성할 권한 필요.
|
||||
$memid = $cpCode; // 회원사코드
|
||||
|
||||
@ -17,10 +17,12 @@ certify_count_check($member['mb_id'], 'ipin');
|
||||
switch($_GET['pageType']){
|
||||
case "register":
|
||||
$resultPage = "/ipin2.php";
|
||||
break;
|
||||
break;
|
||||
case "find":
|
||||
$resultPage = "/find_ipin2.php";
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
alert_close('잘못된 접근입니다.');
|
||||
}
|
||||
// KISA 취약점 내용(KVE-2018-0291) hpcert1.php의 $cmd 함수에 대한 인자 값은 hpcert_config.php 파일에서 설정되나, 이를 다른 페이지에서 포함한 뒤 호출할 시 임의 값 설정 가능
|
||||
// 이에 include_once 를 require 로 수정함
|
||||
|
||||
@ -91,7 +91,7 @@ $mb_dupinfo = md5($ci.$ci); // 통합인증 추가 후 ci로 변경
|
||||
// 중복정보 체크
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id']) {
|
||||
if (!empty($row['mb_id'])) {
|
||||
alert_close("입력하신 본인확인 정보로 가입된 내역이 존재합니다.\\n회원아이디 : ".$row['mb_id']);
|
||||
}
|
||||
|
||||
|
||||
@ -31,6 +31,7 @@ $mb_password_re = isset($_POST['mb_password_re']) ? trim($_POST['mb_password_re'
|
||||
$mb_nick = isset($_POST['mb_nick']) ? trim(strip_tags($_POST['mb_nick'])) : '';
|
||||
$mb_email = isset($_POST['mb_email']) ? trim($_POST['mb_email']) : '';
|
||||
$mb_name = isset($_POST['mb_name']) ? clean_xss_tags(trim(strip_tags($_POST['mb_name']))) : '';
|
||||
$mb_hp = isset($_POST['mb_hp']) ? trim($_POST['mb_hp']) : '';
|
||||
$mb_email = get_email_address($mb_email);
|
||||
|
||||
// 이름, 닉네임에 utf-8 이외의 문자가 포함됐다면 오류
|
||||
@ -106,7 +107,7 @@ if($config['cf_cert_use'] && $config['cf_cert_req']){
|
||||
// 중복체크
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '".get_session('ss_cert_dupinfo')."' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id']) {
|
||||
if (!empty($row['mb_id'])) {
|
||||
alert("입력하신 본인확인 정보로 가입된 내역이 존재합니다.");
|
||||
}
|
||||
}
|
||||
@ -123,8 +124,7 @@ if($config['cf_cert_use'] && $config['cf_cert_req']){
|
||||
$sql_certify .= " , mb_birth = '".get_session('ss_cert_birth')."' ";
|
||||
$sql_certify .= " , mb_sex = '".get_session('ss_cert_sex')."' ";
|
||||
$sql_certify .= " , mb_dupinfo = '".get_session('ss_cert_dupinfo')."' ";
|
||||
if($w == 'u')
|
||||
$sql_certify .= " , mb_name = '{$mb_name}' ";
|
||||
$sql_certify .= " , mb_name = '{$mb_name}' ";
|
||||
} else {
|
||||
$sql_certify .= " , mb_hp = '{$mb_hp}' ";
|
||||
$sql_certify .= " , mb_certify = '' ";
|
||||
|
||||
Reference in New Issue
Block a user