Skip to content

Commit 11718eb

Browse files
projectSylaskagla
authored andcommittedApr 18, 2022
[G5-80] 본인인증 비밀번호 찾기 후 비밀번호 변경 관련 수정
1 parent de72f42 commit 11718eb

File tree

10 files changed

+115
-19
lines changed

10 files changed

+115
-19
lines changed
 

‎bbs/password_reset_update.php

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
<?php
22
include_once('./_common.php');
33

4-
if($w == '')
5-
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
6-
else
7-
alert('잘못된 접근입니다', G5_URL);
4+
$mb_id = isset($_SESSION['ss_cert_mb_id']) ? trim(get_session('ss_cert_mb_id')) : '';
5+
$mb_dupinfo = isset($_SESSION['ss_cert_dupinfo']) ? trim(get_session('ss_cert_dupinfo')) : '';
86

9-
if(!$mb_id)
10-
alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.');
7+
if(!$mb_id) alert('회원아이디 값이 없습니다. 올바른 방법으로 이용해 주십시오.', G5_URL);
8+
9+
if(!$mb_dupinfo) alert('잘못된 접근입니다.', G5_URL);
10+
11+
$mb_check = sql_fetch("select * from {$g5['member_table']} where mb_id = '{$mb_id}' AND mb_dupinfo = '{$mb_dupinfo}'");
12+
13+
if(!$mb_check) alert('잘못된 접근입니다.', G5_URL);
1114

1215
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password_re']) : '';
1316
$mb_password_re = isset($_POST['mb_password_re']) ? trim($_POST['mb_password_re']) : '';
1417

1518

16-
if ($w == '' && !$mb_password)
17-
alert('비밀번호가 넘어오지 않았습니다.');
18-
if($w == '' && $mb_password != $mb_password_re)
19-
alert('비밀번호가 일치하지 않습니다.');
19+
if (!$mb_password)
20+
alert('비밀번호가 넘어오지 않았습니다.');
21+
if ($mb_password != $mb_password_re)
22+
alert('비밀번호가 일치하지 않습니다.');
23+
24+
$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
2025

21-
$sql_password = "";
22-
if ($mb_password)
23-
$sql_password = "mb_password = '".get_encrypt_string($mb_password)."' ";
26+
sql_query("update {$g5['member_table']} set {$sql_password} where mb_id = '{$mb_id}' AND mb_dupinfo = '{$mb_dupinfo}'");
2427

25-
sql_query("update {$g5['member_table']} set {$sql_password} where mb_id = '{$mb_id}'");
28+
set_session('ss_cert_mb_id', '');
29+
set_session('ss_cert_dupinfo', '');
2630

2731
goto_url(G5_BBS_URL.'/login.php');

‎mobile/skin/member/basic/password_reset.skin.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<fieldset id="info_fs">
1313
<p>새로운 비밀번호를 입력해주세요.</p>
1414
<label for="mb_id" class="sound_only">아이디</label>
15-
<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>
15+
<br>
16+
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
1617
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
1718
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
1819
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

‎plugin/inicert/ini_find_result.php

+16
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@
5050
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
5151
exit;
5252
}
53+
54+
$md5_cert_no = md5($cert_no);
55+
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
56+
57+
// 성인인증결과
58+
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
59+
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
60+
61+
set_session("ss_cert_type", $cert_type);
62+
set_session("ss_cert_no", $md5_cert_no);
63+
set_session("ss_cert_hash", $hash_data);
64+
set_session("ss_cert_adult", $adult);
65+
set_session("ss_cert_birth", $birth_day);
66+
//set_session("ss_cert_sex", ($sex_code=="01"?"M":"F")); // 이니시스 간편인증은 성별정보 리턴 없음
67+
set_session('ss_cert_dupinfo', $mb_dupinfo);
68+
set_session('ss_cert_mb_id', $row['mb_id']);
5369
} else {
5470
// 인증실패 curl의 인증실패 체크
5571
alert_close('코드 : '.$res_data['resultCode'].' '.urldecode($res_data['resultMsg']));

‎plugin/kcpcert/find_kcpcert_result.php

+18
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,25 @@
159159
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
160160
exit;
161161
}
162+
}else{
163+
$mb_dupinfo = $md5_ci;
162164
}
165+
166+
$md5_cert_no = md5($cert_no);
167+
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
168+
169+
// 성인인증결과
170+
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
171+
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
172+
173+
set_session("ss_cert_type", $cert_type);
174+
set_session("ss_cert_no", $md5_cert_no);
175+
set_session("ss_cert_hash", $hash_data);
176+
set_session("ss_cert_adult", $adult);
177+
set_session("ss_cert_birth", $birth_day);
178+
set_session("ss_cert_sex", ($sex_code=="01"?"M":"F")); // 이니시스 간편인증은 성별정보 리턴 없음
179+
set_session('ss_cert_dupinfo', $mb_dupinfo);
180+
set_session('ss_cert_mb_id', $row['mb_id']);
163181
}
164182
else if( $res_cd != "0000" )
165183
{

‎plugin/lgxpay/find_AuthOnlyRes.php

+18-1
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,25 @@ public function set_config_value($key, $val)
136136
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
137137
exit;
138138
}
139+
}else{
140+
$mb_dupinfo = $md5_ci;
139141
}
140-
142+
143+
$md5_cert_no = md5($cert_no);
144+
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
145+
146+
// 성인인증결과
147+
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
148+
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
149+
150+
set_session("ss_cert_type", $cert_type);
151+
set_session("ss_cert_no", $md5_cert_no);
152+
set_session("ss_cert_hash", $hash_data);
153+
set_session("ss_cert_adult", $adult);
154+
set_session("ss_cert_birth", $birth_day);
155+
set_session("ss_cert_sex", $mb_sex); // 이니시스 간편인증은 성별정보 리턴 없음
156+
set_session('ss_cert_dupinfo', $mb_dupinfo);
157+
set_session('ss_cert_mb_id', $row['mb_id']);
141158
} else {
142159
//인증요청 결과 실패 DB처리
143160
//echo "인증요청 결과 실패 DB처리하시기 바랍니다.<br>";

‎plugin/okname/find_hpcert2.php

+18
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,26 @@
121121
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
122122
exit;
123123
}
124+
}else{
125+
$mb_dupinfo = $md5_ci;
124126
}
125127

128+
$md5_cert_no = md5($cert_no);
129+
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
130+
131+
// 성인인증결과
132+
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
133+
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
134+
135+
set_session("ss_cert_type", $cert_type);
136+
set_session("ss_cert_no", $md5_cert_no);
137+
set_session("ss_cert_hash", $hash_data);
138+
set_session("ss_cert_adult", $adult);
139+
set_session("ss_cert_birth", $birth_day);
140+
set_session('ss_cert_sex', ($field[9] == 1 ? 'M' : 'F'));
141+
set_session('ss_cert_dupinfo', $mb_dupinfo);
142+
set_session('ss_cert_mb_id', $row['mb_id']);
143+
126144
$g5['title'] = 'KCB 휴대폰 본인확인';
127145
include_once(G5_PATH.'/head.sub.php');
128146
?>

‎plugin/okname/find_ipin2.php

+19
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,26 @@
9595
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
9696
exit;
9797
}
98+
}else{
99+
$mb_dupinfo = $md5_ci;
98100
}
101+
102+
$md5_cert_no = md5($cert_no);
103+
$hash_data = md5($user_name.$cert_type.$birth_day.$phone_no.$md5_cert_no);
104+
105+
// 성인인증결과
106+
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
107+
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
108+
109+
set_session("ss_cert_type", $cert_type);
110+
set_session("ss_cert_no", $md5_cert_no);
111+
set_session("ss_cert_hash", $hash_data);
112+
set_session("ss_cert_adult", $adult);
113+
set_session("ss_cert_birth", $birth_day);
114+
set_session('ss_cert_sex', ($field[9] == 1 ? 'M' : 'F'));
115+
set_session('ss_cert_dupinfo', $mb_dupinfo);
116+
set_session('ss_cert_mb_id', $row['mb_id']);
117+
99118
$g5['title'] = 'KCB 아이핀 본인확인';
100119
include_once(G5_PATH.'/head.sub.php');
101120
?>

‎skin/member/basic/password_reset.skin.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<fieldset id="info_fs">
1313
<p>새로운 비밀번호를 입력해주세요.</p>
1414
<label for="mb_id" class="sound_only">아이디</label>
15-
<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>
15+
<br>
16+
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
1617
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
1718
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
1819
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

‎theme/basic/mobile/skin/member/basic/password_reset.skin.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<fieldset id="info_fs">
1313
<p>새로운 비밀번호를 입력해주세요.</p>
1414
<label for="mb_id" class="sound_only">아이디</label>
15-
<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>
15+
<br>
16+
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
1617
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
1718
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
1819
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

‎theme/basic/skin/member/basic/password_reset.skin.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<fieldset id="info_fs">
1313
<p>새로운 비밀번호를 입력해주세요.</p>
1414
<label for="mb_id" class="sound_only">아이디</label>
15-
<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>
15+
<br>
16+
<b>회원 아이디 : <?php echo $_POST['mb_id']; ?></b>
1617
<label for="mb_pw" class="sound_only">새 비밀번호<strong class="sound_only">필수</strong></label>
1718
<input type="password" name="mb_password" id="mb_pw" required class="required frm_input full_input" size="30" placeholder="새 비밀번호">
1819
<label for="mb_pw2" class="sound_only">새 비밀번호 확인<strong class="sound_only">필수</strong></label>

0 commit comments

Comments
 (0)
Please sign in to comment.