diff --git a/bbs/password_reset_update.php b/bbs/password_reset_update.php index e6299f092..f9aafebc1 100644 --- a/bbs/password_reset_update.php +++ b/bbs/password_reset_update.php @@ -1,7 +1,6 @@ '{$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; } diff --git a/plugin/kcpcert/kcpcert_form.php b/plugin/kcpcert/kcpcert_form.php index 5270b4a31..628f70a79 100644 --- a/plugin/kcpcert/kcpcert_form.php +++ b/plugin/kcpcert/kcpcert_form.php @@ -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 휴대폰인증파일 diff --git a/plugin/kcpcert/kcpcert_result.php b/plugin/kcpcert/kcpcert_result.php index a3a911d9a..8b3175d08 100644 --- a/plugin/kcpcert/kcpcert_result.php +++ b/plugin/kcpcert/kcpcert_result.php @@ -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']); } diff --git a/plugin/kgcert/kg_find_result.php b/plugin/kgcert/kg_find_result.php index 7d3570e3d..77de6cf6e 100644 --- a/plugin/kgcert/kg_find_result.php +++ b/plugin/kgcert/kg_find_result.php @@ -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; } diff --git a/plugin/kgcert/kg_request.php b/plugin/kgcert/kg_request.php index 90a065fd6..f93dea495 100644 --- a/plugin/kgcert/kg_request.php +++ b/plugin/kgcert/kg_request.php @@ -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; diff --git a/plugin/lgxpay/AuthOnlyReq.php b/plugin/lgxpay/AuthOnlyReq.php index 3ebcac3c9..d0f3a170f 100644 --- a/plugin/lgxpay/AuthOnlyReq.php +++ b/plugin/lgxpay/AuthOnlyReq.php @@ -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('잘못된 접근입니다.'); } /* diff --git a/plugin/lgxpay/find_AuthOnlyRes.php b/plugin/lgxpay/find_AuthOnlyRes.php index c4f69fc79..a3140ef55 100644 --- a/plugin/lgxpay/find_AuthOnlyRes.php +++ b/plugin/lgxpay/find_AuthOnlyRes.php @@ -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; } diff --git a/plugin/okname/find_hpcert2.php b/plugin/okname/find_hpcert2.php index ffd4aac09..de14f7567 100644 --- a/plugin/okname/find_hpcert2.php +++ b/plugin/okname/find_hpcert2.php @@ -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; } diff --git a/plugin/okname/find_ipin2.php b/plugin/okname/find_ipin2.php index 3452d84bf..af767aac3 100644 --- a/plugin/okname/find_ipin2.php +++ b/plugin/okname/find_ipin2.php @@ -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; } diff --git a/plugin/okname/hpcert.config.php b/plugin/okname/hpcert.config.php index c3db9993b..7d1db74ba 100644 --- a/plugin/okname/hpcert.config.php +++ b/plugin/okname/hpcert.config.php @@ -80,4 +80,5 @@ if($config['cf_cert_use'] == 2) { // ######################################################################## // # 리턴 URL 설정 // ######################################################################## +if(!empty($resultPage)) $returnUrl = escapeshellarg(G5_OKNAME_URL.$resultPage); // 본인인증 완료후 리턴될 URL (도메인 포함 full path); \ No newline at end of file diff --git a/plugin/okname/hpcert1.php b/plugin/okname/hpcert1.php index 000dbd751..d208ab5b8 100644 --- a/plugin/okname/hpcert1.php +++ b/plugin/okname/hpcert1.php @@ -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 로 수정함 diff --git a/plugin/okname/hpcert2.php b/plugin/okname/hpcert2.php index eec69ab37..d1ea884c4 100644 --- a/plugin/okname/hpcert2.php +++ b/plugin/okname/hpcert2.php @@ -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'); ?> diff --git a/plugin/okname/ipin.config.php b/plugin/okname/ipin.config.php index 8b03fb980..0489c11d7 100644 --- a/plugin/okname/ipin.config.php +++ b/plugin/okname/ipin.config.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; // 회원사코드 diff --git a/plugin/okname/ipin1.php b/plugin/okname/ipin1.php index 3e4fe4f3e..17e60c5c5 100644 --- a/plugin/okname/ipin1.php +++ b/plugin/okname/ipin1.php @@ -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 로 수정함 diff --git a/plugin/okname/ipin2.php b/plugin/okname/ipin2.php index bc3b52835..7f755cb5a 100644 --- a/plugin/okname/ipin2.php +++ b/plugin/okname/ipin2.php @@ -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']); } diff --git a/plugin/social/register_member_update.php b/plugin/social/register_member_update.php index 5c6abe013..228c52d1a 100644 --- a/plugin/social/register_member_update.php +++ b/plugin/social/register_member_update.php @@ -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 = '' ";