충돌수정

This commit is contained in:
thisgun
2018-11-26 15:19:26 +09:00
4 changed files with 31 additions and 0 deletions

View File

@ -1,6 +1,9 @@
<?php
include_once('./_common.php');
// 봇의 메일 링크 크롤링을 방지합니다.
if(function_exists('check_mail_bot')){ check_mail_bot($_SERVER['REMOTE_ADDR']); }
$mb_id = trim($_GET['mb_id']);
$mb_md5 = trim($_GET['mb_md5']);

View File

@ -1,6 +1,9 @@
<?php
include_once('./_common.php');
// 봇의 메일 링크 크롤링을 방지합니다.
if(function_exists('check_mail_bot')){ check_mail_bot($_SERVER['REMOTE_ADDR']); }
// 오류시 공히 Error 라고 처리하는 것은 회원정보가 있는지? 비밀번호가 틀린지? 를 알아보려는 해킹에 대비한것
$mb_no = trim($_GET['mb_no']);

View File

@ -5,8 +5,12 @@
********************/
define('G5_VERSION', '그누보드5');
<<<<<<< HEAD
define('G5_GNUBOARD_VER', '5.3.2.0');
define('G5_YOUNGCART_VER', '5.3.2.0');
=======
define('G5_GNUBOARD_VER', '5.3.2.1');
>>>>>>> 70d48e4d5a4ca634bda2ba7095a6207ec1ccf5a8
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);

View File

@ -3449,6 +3449,27 @@ function get_real_client_ip(){
return preg_replace('/[^0-9.]/', '', $real_ip);
}
function check_mail_bot($ip=''){
//아이피를 체크하여 메일 크롤링을 방지합니다.
$check_ips = array('211.249.40.');
$bot_message = 'bot 으로 판단되어 중지합니다.';
if($ip){
foreach( $check_ips as $c_ip ){
if( preg_match('/^'.preg_quote($c_ip).'/', $ip) ) {
die($bot_message);
}
}
}
// user agent를 체크하여 메일 크롤링을 방지합니다.
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
if ($user_agent === 'Carbon' || strpos($user_agent, 'BingPreview') !== false || strpos($user_agent, 'Slackbot') !== false) {
die($bot_message);
}
}
function get_call_func_cache($func, $args=array()){
static $cache = array();