원격코드 실행 취약점(17-00160) 수정

This commit is contained in:
thisgun
2017-03-14 12:30:58 +09:00
parent 20f658ffbb
commit c6425adffc
5 changed files with 26 additions and 2 deletions

View File

@ -35,6 +35,14 @@ if ($file = $_POST['bo_include_tail']) {
$_POST['bo_include_tail'] = $file;
}
if(!is_include_path_check($_POST['bo_include_head'])) {
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
}
if(!is_include_path_check($_POST['bo_include_tail'])) {
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
}
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
// 게시판 디렉토리 생성

View File

@ -12,5 +12,7 @@ if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
//$sms5 = sql_fetch("select * from ".$g5['sms5_config_table'] );
}
$sv = isset($_REQUEST['sv']) ? get_search_string($_REQUEST['sv']) : '';
add_stylesheet('<link rel="stylesheet" href="'.G5_SMS5_ADMIN_URL.'/css/sms5.css">', 0);
?>

View File

@ -7,7 +7,11 @@ if (G5_IS_MOBILE) {
include_once(G5_BBS_PATH.'/_head.php');
echo stripslashes($board['bo_mobile_content_head']);
} else {
@include ($board['bo_include_head']);
if(is_include_path_check($board['bo_include_head'])) { //파일경로 체크
@include ($board['bo_include_head']);
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
include_once(G5_BBS_PATH.'/_head.php');
}
echo stripslashes($board['bo_content_head']);
}
?>

View File

@ -8,6 +8,10 @@ if (G5_IS_MOBILE) {
include_once(G5_BBS_PATH.'/_tail.php');
} else {
echo stripslashes($board['bo_content_tail']);
@include ($board['bo_include_tail']);
if(is_include_path_check($board['bo_include_tail'])) { //파일경로 체크
@include ($board['bo_include_tail']);
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
include_once(G5_BBS_PATH.'/_tail.php');
}
}
?>

View File

@ -4,3 +4,9 @@ www.youtube(?:-nocookie)?.com/
serviceapi.rmcnmv.naver.com/
videofarm.daum.net/
player.vimeo.com/
maps.google.com/
play.afreeca.com/
v.nate.com/
www.microsoft.com/showcase/video.aspx/
w.soundcloud.com/
www.facebook.com/