Merge branch 'master' of github.com:gnuboard/g5
This commit is contained in:
@ -29,8 +29,8 @@ if ($board && ($board['bo_include_head'] !== $_POST['bo_include_head'] || $board
|
||||
if ($file = $_POST['bo_include_head']) {
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
$_POST['bo_include_head'] = $file;
|
||||
}
|
||||
@ -38,8 +38,8 @@ if ($file = $_POST['bo_include_head']) {
|
||||
if ($file = $_POST['bo_include_tail']) {
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
$_POST['bo_include_tail'] = $file;
|
||||
}
|
||||
|
||||
@ -41,8 +41,8 @@ if( $co_include_head ){
|
||||
|
||||
$file_ext = pathinfo($co_include_head, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $co_include_head) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,8 +50,8 @@ if( $co_include_tail ){
|
||||
|
||||
$file_ext = pathinfo($co_include_tail, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $co_include_tail) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,16 +24,16 @@ if ($board && ($qaconfig['qa_include_head'] !== $_POST['qa_include_head'] || $qa
|
||||
if( $qa_include_head ){
|
||||
$file_ext = pathinfo($qa_include_head, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $qa_include_head) ) {
|
||||
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if( $qa_include_tail ){
|
||||
$file_ext = pathinfo($qa_include_tail, PATHINFO_EXTENSION);
|
||||
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $qa_include_tail) ) {
|
||||
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -13,6 +13,8 @@ $g5['title'] = "이모티콘 관리";
|
||||
|
||||
if ($page < 1) $page = 1;
|
||||
|
||||
$fg_no = isset($fg_no) ? (int) $fg_no : '';
|
||||
|
||||
if (is_numeric($fg_no))
|
||||
$sql_group = " and fg_no='$fg_no' ";
|
||||
else
|
||||
|
||||
@ -14,6 +14,7 @@ $g5['title'] = "휴대폰번호 관리";
|
||||
if ($page < 1) $page = 1;
|
||||
|
||||
$bg_no = isset($bg_no) ? (int) $bg_no : 0;
|
||||
$st = isset($st) ? preg_replace('/[^a-z0-9]/i', '', $st) : '';
|
||||
|
||||
if (is_numeric($bg_no))
|
||||
$sql_group = " and bg_no='$bg_no' ";
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
********************/
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.3.1.3');
|
||||
define('G5_GNUBOARD_VER', '5.3.1.4');
|
||||
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
@ -3478,7 +3478,7 @@ function is_include_path_check($path='', $is_input='')
|
||||
return false;
|
||||
}
|
||||
|
||||
if( preg_match('/\/data\/(file|editor)\/[A-Za-z0-9_]{1,20}\//', $path) ){
|
||||
if( preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $path) ){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user