CSFR 취약점 해결

This commit is contained in:
gnuboard
2013-05-24 10:59:25 +09:00
parent dd060fb365
commit dd63651ede
2 changed files with 0 additions and 63 deletions

View File

@ -1,28 +0,0 @@
<?php
$sub_menu = "300100";
include_once('./_common.php');
check_demo();
if ($is_admin != 'super')
alert("게시판 삭제는 최고관리자만 가능합니다.");
auth_check($auth[$sub_menu], 'd');
check_token();
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
define('_BOARD_DELETE_', TRUE);
// include 전에 $bo_table 값을 반드시 넘겨야 함
$tmp_bo_table = escape_trim($_GET['bo_table']);
$sql = " select * from {$g4['board_table']} where bo_table = '{$tmp_bo_table}' ";
$row = sql_fetch($sql);
if (!$row) {
alert('게시판을 삭제할 수 없습니다.');
}
include_once ('./board_delete.inc.php');
goto_url('./board_list.php?'.$qstr.'&amp;page='.$page);
?>

View File

@ -1,35 +0,0 @@
<?php
$sub_menu = "300200";
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], 'd');
$gr_id = mysql_real_escape_string(trim($_POST['gr_id']));
$row = sql_fetch(" select count(*) as cnt from {$g4['board_table']} where gr_id = '{$gr_id}' ");
if ($row['cnt'])
alert('이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.', './board_list.php?sfl=gr_id&amp;stx='.$gr_id);
/*
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
define("_BOARD_DELETE_", TRUE);
$sql = " select * from $g4['board_table'] where gr_id = '$gr_id' ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
$tmp_bo_table = $row['bo_table'];
include ('./board_delete.inc.php');
}
*/
// 그룹 삭제
sql_query(" delete from {$g4['group_table']} where gr_id = '{$gr_id}' ");
// 그룹접근 회원 삭제
sql_query(" delete from {$g4['group_member_table']} where gr_id = '{$gr_id}' ");
goto_url('boardgroup_list.php?'.$qstr);
?>