그누보드5 다중 취약점 수정 adm1nkyj( http://adm1nkyj.kr/ ) 제보

This commit is contained in:
thisgun
2018-10-17 18:01:42 +09:00
parent 784f631896
commit aa7ffdf093
4 changed files with 7 additions and 4 deletions

View File

@ -20,6 +20,7 @@ if ($w == "" || $w == "u")
$co_row = sql_fetch($sql);
}
$co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);
$co_subject = strip_tags($co_subject);
$co_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_head, 0, 255));
$co_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_tail, 0, 255));
@ -59,12 +60,12 @@ if( $co_include_tail ){
}
}
if( $co_include_head && ! is_include_path_check($co_include_head) ){
if( $co_include_head && ! is_include_path_check($co_include_head, 1) ){
$co_include_head = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
}
if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
if( $co_include_tail && ! is_include_path_check($co_include_tail, 1) ){
$co_include_tail = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
}

View File

@ -1,6 +1,8 @@
<?php
include_once('./_common.php');
$co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);
//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크
if( !isset($g5['content_table']) ){
die('<meta charset="utf-8">관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.');

View File

@ -4,8 +4,7 @@ include_once('./_common.php');
$g5['title'] = '이미지 크게보기';
include_once(G5_PATH.'/head.sub.php');
$filename = $_GET['fn'];
$bo_table = $_GET['bo_table'];
$filename = preg_replace('/[^A-Za-z0-9 _ .-]/', '', $_GET['fn']);
if(strpos($filename, 'data/editor')) {
$editor_file = strstr($filename, 'editor');

View File

@ -71,6 +71,7 @@ document.onkeydown = noRefresh ;
<?php
flush();
$g4 = array();
// g4의 confing.php
require('./'.$g4_config_file);