CVE-2022-44216: Missing Authentication for Critical Function (CWE-306)
value: Gnuboard 5.5.4 and 5.5.5 is vulnerable to Insecure Permissions. An attacker can change password of all users without knowing victim's original password.
CWE description: The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
CVSS v3 base score: 7.5
Published: 2023-02-20T20:15Z
Repository: https://github.com/gnuboard/gnuboard5
Language: PHP
Files changed: bbs/password_reset_update.php, mobile/skin/member/basic/password_reset.skin.php, plugin/inicert/ini_find_result.php, plugin/kcpcert/find_kcpcert_result.php, plugin/lgxpay/find_AuthOnlyRes.php, plugin/okname/find_hpcert2.php, plugin/okname/find_ipin2.php, skin/member/basic/password_reset.skin.php, theme/basic/mobile/skin/member/basic/password_reset.skin.php, theme/basic/skin/member/basic/password_reset.skin.php
Commit date: 2022-04-18 16:51:53 +0900
Commit message: [G5-80] 본인인증 비밀번호 찾기 후 비밀번호 변경 관련 수정

Diff: diff --git a/bbs/password_reset_update.php b/bbs/password_reset_update.php
index f9aafebc1..01ecfb08e 100644
--- a/bbs/password_reset_update.php
+++ b/bbs/password_reset_update.php
@@ -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 = "mb_password = '".get_encrypt_string($mb_password)."' ";
 
-$sql_password = "";
-if ($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}' AND mb_dupinfo = '{$mb_dupinfo}'");
 
-sql_query("update {$g5['member_table']} set {$sql_password} where mb_id = '{$mb_id}'");
+set_session('ss_cert_mb_id', '');
+set_session('ss_cert_dupinfo', '');
 
 goto_url(G5_BBS_URL.'/login.php');
\ No newline at end of file
diff --git a/mobile/skin/member/basic/password_reset.skin.php b/mobile/skin/member/basic/password_reset.skin.php
index ecab6a228..f7dfafdaa 100644
--- a/mobile/skin/member/basic/password_reset.skin.php
+++ b/mobile/skin/member/basic/password_reset.skin.php
@@ -10,11 +10,12 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
     <div class="new_win_con">
         <form name="fpasswordreset" action="<?php echo $action_url; ?>" onsubmit="return fpasswordreset_submit(this);" method="post" autocomplete="off">
             <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>
                 <input type="password" name="mb_password_re" id="mb_pw2" required class="required frm_input full_input" size="30" placeholder="새 비밀번호 확인">
             </fieldset>
diff --git a/plugin/inicert/ini_find_result.php b/plugin/inicert/ini_find_result.php
index c47b7a258..258e615ad 100644
--- a/plugin/inicert/ini_find_result.php
+++ b/plugin/inicert/ini_find_result.php
@@ -48,10 +48,26 @@ if ($_POST["resultCode"] === "0000") {
         $row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // ci데이터로 찾음
         if(empty($row['mb_id'])) { // ci로 등록된 계정이 없다면
             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']));
         exit;
     }
diff --git a/plugin/kcpcert/find_kcpcert_result.php b/plugin/kcpcert/find_kcpcert_result.php
index 328f8cee0..a882cbb82 100644
--- a/plugin/kcpcert/find_kcpcert_result.php
+++ b/plugin/kcpcert/find_kcpcert_result.php
@@ -157,11 +157,29 @@ if( $cert_enc_use == "Y" )
             $row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // di데이터로 찾음
             if (empty($row['mb_id'])) { // di로 등록된 계정도 없다면
                 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" )
     {
         // 인증실패
         alert_close('코드 : '.$_POST['res_cd'].'  '.urldecode($_POST['res_msg']));
diff --git a/plugin/lgxpay/find_AuthOnlyRes.php b/plugin/lgxpay/find_AuthOnlyRes.php
index a3140ef55..e1c0e958e 100644
--- a/plugin/lgxpay/find_AuthOnlyRes.php
+++ b/plugin/lgxpay/find_AuthOnlyRes.php
@@ -134,12 +134,29 @@ if ($xpay->TX()) {
             $row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // di데이터로 찾음
             if(empty($row['mb_id'])) {
                 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>";
 
         if( G5_IS_MOBILE ){
diff --git a/plugin/okname/find_hpcert2.php b/plugin/okname/find_hpcert2.php
index de14f7567..0e0bc5fa3 100644
--- a/plugin/okname/find_hpcert2.php
+++ b/plugin/okname/find_hpcert2.php
@@ -119,12 +119,30 @@ 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(empty($row['mb_id'])) {
         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');
 ?>
 <form name="mbFindForm" method="POST">
     <input type="hidden" name="mb_id" value="<?php echo $row["mb_id"]; ?>">    
diff --git a/plugin/okname/find_ipin2.php b/plugin/okname/find_ipin2.php
index af767aac3..f617791c0 100644
--- a/plugin/okname/find_ipin2.php
+++ b/plugin/okname/find_ipin2.php
@@ -93,11 +93,30 @@ 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(empty($row['mb_id'])) {
         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');
 ?>
 
 <form name="mbFindForm" method="POST">
diff --git a/skin/member/basic/password_reset.skin.php b/skin/member/basic/password_reset.skin.php
index ecab6a228..f7dfafdaa 100644
--- a/skin/member/basic/password_reset.skin.php
+++ b/skin/member/basic/password_reset.skin.php
@@ -10,11 +10,12 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
     <div class="new_win_con">
         <form name="fpasswordreset" action="<?php echo $action_url; ?>" onsubmit="return fpasswordreset_submit(this);" method="post" autocomplete="off">
             <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>
                 <input type="password" name="mb_password_re" id="mb_pw2" required class="required frm_input full_input" size="30" placeholder="새 비밀번호 확인">
             </fieldset>
diff --git a/theme/basic/mobile/skin/member/basic/password_reset.skin.php b/theme/basic/mobile/skin/member/basic/password_reset.skin.php
index ecab6a228..f7dfafdaa 100644
--- a/theme/basic/mobile/skin/member/basic/password_reset.skin.php
+++ b/theme/basic/mobile/skin/member/basic/password_reset.skin.php
@@ -10,11 +10,12 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
     <div class="new_win_con">
         <form name="fpasswordreset" action="<?php echo $action_url; ?>" onsubmit="return fpasswordreset_submit(this);" method="post" autocomplete="off">
             <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>
                 <input type="password" name="mb_password_re" id="mb_pw2" required class="required frm_input full_input" size="30" placeholder="새 비밀번호 확인">
             </fieldset>
diff --git a/theme/basic/skin/member/basic/password_reset.skin.php b/theme/basic/skin/member/basic/password_reset.skin.php
index ecab6a228..f7dfafdaa 100644
--- a/theme/basic/skin/member/basic/password_reset.skin.php
+++ b/theme/basic/skin/member/basic/password_reset.skin.php
@@ -10,11 +10,12 @@ add_stylesheet('<link rel="stylesheet" href="' . $member_skin_url . '/style.css"
     <div class="new_win_con">
         <form name="fpasswordreset" action="<?php echo $action_url; ?>" onsubmit="return fpasswordreset_submit(this);" method="post" autocomplete="off">
             <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>
                 <input type="password" name="mb_password_re" id="mb_pw2" required class="required frm_input full_input" size="30" placeholder="새 비밀번호 확인">
             </fieldset>

Vulnerable code: if($w == '')
    $mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
else
    alert('잘못된 접근입니다', G5_URL);
if(!$mb_id)
    alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.');
if ($w == '' && !$mb_password)
alert('비밀번호가 넘어오지 않았습니다.');
if($w == '' && $mb_password != $mb_password_re)
alert('비밀번호가 일치하지 않습니다.');
$sql_password = "";
if ($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}'");
                <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>

                <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>
                <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>
                <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>
Fixed code: $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('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.', 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);
if (!$mb_password)
    alert('비밀번호가 넘어오지 않았습니다.');
if ($mb_password != $mb_password_re)
    alert('비밀번호가 일치하지 않습니다.');

$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
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', '');
                <br>
                <b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>

        $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{
            $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{
            $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{
    $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']);

}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']);

                <br>
                <b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
                <br>
                <b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
                <br>
                <b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>