그누보드, 영카트 다중 취약점 (18-062, 092, 101, 102) 수정
This commit is contained in:
@ -18,18 +18,18 @@ $_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_incl
|
|||||||
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
|
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
|
||||||
|
|
||||||
if ($file = $_POST['bo_include_head']) {
|
if ($file = $_POST['bo_include_head']) {
|
||||||
$purl = parse_url($file);
|
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
$file = $purl['path'];
|
|
||||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
}
|
}
|
||||||
$_POST['bo_include_head'] = $file;
|
$_POST['bo_include_head'] = $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($file = $_POST['bo_include_tail']) {
|
if ($file = $_POST['bo_include_tail']) {
|
||||||
$purl = parse_url($file);
|
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||||
$file = $purl['path'];
|
|
||||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
}
|
}
|
||||||
$_POST['bo_include_tail'] = $file;
|
$_POST['bo_include_tail'] = $file;
|
||||||
|
|||||||
@ -8,6 +8,8 @@ if (!count($_POST['chk'])) {
|
|||||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_admin_token();
|
||||||
|
|
||||||
if ($_POST['act_button'] == "선택수정") {
|
if ($_POST['act_button'] == "선택수정") {
|
||||||
|
|
||||||
auth_check($auth[$sub_menu], 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
@ -19,7 +21,7 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super') {
|
||||||
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
||||||
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
where a.gr_id = '".sql_real_escape_string($_POST['gr_id'][$k])."'
|
||||||
and a.gr_id = b.gr_id
|
and a.gr_id = b.gr_id
|
||||||
and b.gr_admin = '{$member['mb_id']}' ";
|
and b.gr_admin = '{$member['mb_id']}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
@ -28,19 +30,20 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = " update {$g5['board_table']}
|
$sql = " update {$g5['board_table']}
|
||||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
set gr_id = '".sql_real_escape_string($_POST['gr_id'][$k])."',
|
||||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
bo_subject = '".sql_real_escape_string($_POST['bo_subject'][$k])."',
|
||||||
bo_device = '{$_POST['bo_device'][$k]}',
|
bo_device = '".sql_real_escape_string($_POST['bo_device'][$k])."',
|
||||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
bo_skin = '".sql_real_escape_string($_POST['bo_skin'][$k])."',
|
||||||
bo_mobile_skin = '{$_POST['bo_mobile_skin'][$k]}',
|
bo_mobile_skin = '".sql_real_escape_string($_POST['bo_mobile_skin'][$k])."',
|
||||||
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
bo_read_point = '".sql_real_escape_string($_POST['bo_read_point'][$k])."',
|
||||||
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
bo_write_point = '".sql_real_escape_string($_POST['bo_write_point'][$k])."',
|
||||||
bo_comment_point = '{$_POST['bo_comment_point'][$k]}',
|
bo_comment_point = '".sql_real_escape_string($_POST['bo_comment_point'][$k])."',
|
||||||
bo_download_point = '{$_POST['bo_download_point'][$k]}',
|
bo_download_point = '".sql_real_escape_string($_POST['bo_download_point'][$k])."',
|
||||||
bo_use_search = '{$_POST['bo_use_search'][$k]}',
|
bo_use_search = '".sql_real_escape_string($_POST['bo_use_search'][$k])."',
|
||||||
bo_use_sns = '{$_POST['bo_use_sns'][$k]}',
|
bo_use_sns = '".sql_real_escape_string($_POST['bo_use_sns'][$k])."',
|
||||||
bo_order = '{$_POST['bo_order'][$k]}'
|
bo_order = '".sql_real_escape_string($_POST['bo_order'][$k])."'
|
||||||
where bo_table = '{$_POST['board_table'][$k]}' ";
|
where bo_table = '".sql_real_escape_string($_POST['board_table'][$k])."' ";
|
||||||
|
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,8 +54,6 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
|
|
||||||
auth_check($auth[$sub_menu], 'd');
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
check_admin_token();
|
|
||||||
|
|
||||||
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||||
define('_BOARD_DELETE_', true);
|
define('_BOARD_DELETE_', true);
|
||||||
|
|
||||||
|
|||||||
@ -11,17 +11,17 @@ check_admin_token();
|
|||||||
$error_msg = '';
|
$error_msg = '';
|
||||||
|
|
||||||
if( $qa_include_head ){
|
if( $qa_include_head ){
|
||||||
$purl = parse_url($qa_include_head);
|
$file_ext = pathinfo($qa_include_head, PATHINFO_EXTENSION);
|
||||||
$file = $purl['path'];
|
|
||||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||||
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $qa_include_tail ){
|
if( $qa_include_tail ){
|
||||||
$purl = parse_url($qa_include_tail);
|
$file_ext = pathinfo($qa_include_tail, PATHINFO_EXTENSION);
|
||||||
$file = $purl['path'];
|
|
||||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
|
||||||
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,8 @@ auth_check($auth[$sub_menu], "r");
|
|||||||
$g5['title'] = '이모티콘그룹 이동';
|
$g5['title'] = '이모티콘그룹 이동';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
$fo_no_list = implode(',', $_POST['fo_no']);
|
$list = array(); //배열 변수 초기화
|
||||||
|
$fo_no_list = isset($_POST['fo_no']) ? implode(',', $_POST['fo_no']) : '';
|
||||||
|
|
||||||
$sql = " select * from {$g5['sms5_form_group_table']} order by fg_no ";
|
$sql = " select * from {$g5['sms5_form_group_table']} order by fg_no ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
@ -27,7 +28,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
|||||||
<form name="fboardmoveall" method="post" action="./emoticon_move_update.php" onsubmit="return fboardmoveall_submit(this);">
|
<form name="fboardmoveall" method="post" action="./emoticon_move_update.php" onsubmit="return fboardmoveall_submit(this);">
|
||||||
<input type="hidden" name="sw" value="<?php echo $sw ?>">
|
<input type="hidden" name="sw" value="<?php echo $sw ?>">
|
||||||
<input type="hidden" name="fo_no_list" value="<?php echo $fo_no_list ?>">
|
<input type="hidden" name="fo_no_list" value="<?php echo $fo_no_list ?>">
|
||||||
<input type="hidden" name="url" value="<?php echo $_SERVER['HTTP_REFERER'] ?>">
|
<input type="hidden" name="url" value="<?php echo clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])); ?>">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
Reference in New Issue
Block a user