diff --git a/bbs/password_reset.php b/bbs/password_reset.php index 088d734db..6600f3d4d 100644 --- a/bbs/password_reset.php +++ b/bbs/password_reset.php @@ -4,7 +4,8 @@ include_once('./_common.php'); if ($is_member) { alert("이미 로그인중입니다."); goto_url(G5_URL); } -if(!$_POST['mb_id']) { alert("잘못된 접근입니다."); goto_url(G5_URL); } +$ss_cert_mb_id = isset($_SESSION['ss_cert_mb_id']) ? trim(get_session('ss_cert_mb_id')) : ''; +if(!(isset($_POST['mb_id']) && $_POST['mb_id'] === $ss_cert_mb_id)) { alert("잘못된 접근입니다."); goto_url(G5_URL); } if($config['cf_cert_find'] != 1) alert("본인인증을 이용하여 아이디/비밀번호 찾기를 할 수 없습니다. 관리자에게 문의 하십시오."); diff --git a/plugin/inicert/ini_find_result.php b/plugin/inicert/ini_find_result.php index 258e615ad..c0e9825b8 100644 --- a/plugin/inicert/ini_find_result.php +++ b/plugin/inicert/ini_find_result.php @@ -1,10 +1,10 @@ $mid, @@ -13,6 +13,12 @@ if ($_POST["resultCode"] === "0000") { $post_data = json_encode($data); + $url_data = isset($_POST["authRequestUrl"]) ? @parse_url($_POST["authRequestUrl"]) : array(); + + if(!(isset($url_data["host"]) && preg_match("#\.inicis\.com$#", $url_data["host"]))){ + alert('잘못된 요청입니다.', G5_URL); + } + // curl 통신 시작 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $_POST["authRequestUrl"]); @@ -73,7 +79,7 @@ if ($_POST["resultCode"] === "0000") { } } else { // resultCode===0000 아닐경우 아래 인증 실패를 출력함 // 인증실패 - alert_close('코드 : '.$_POST['resultCode'].' '.urldecode($_POST['resultMsg'])); + alert_close('코드 : '.(isset($_POST['resultCode']) ? clean_xss_tags($_POST['resultCode'], 1, 1) : '').' '.(isset($_POST['resultMsg']) ? clean_xss_tags(urldecode($_POST['resultMsg']), 1, 1) : '')); exit; } @@ -81,7 +87,7 @@ $g5['title'] = 'KG이니시스 간편인증 결과'; include_once(G5_PATH.'/head.sub.php'); ?>
-"> +">