게시글 댓글 삭제 때 토큰 체크 추가
This commit is contained in:
@ -9,11 +9,6 @@ if ($is_guest && $board['bo_comment_level'] < 2) {
|
||||
|
||||
@include_once($board_skin_path.'/view_comment.head.skin.php');
|
||||
|
||||
// 코멘트를 새창으로 여는 경우 세션값이 없으므로 생성한다.
|
||||
if ($is_admin && !$token) {
|
||||
set_session("ss_delete_token", $token = uniqid(time()));
|
||||
}
|
||||
|
||||
$list = array();
|
||||
|
||||
$is_comment_write = false;
|
||||
@ -72,10 +67,13 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$list[$i]['is_del'] = false;
|
||||
if ($is_comment_write || $is_admin)
|
||||
{
|
||||
$token = '';
|
||||
|
||||
if ($member['mb_id'])
|
||||
{
|
||||
if ($row['mb_id'] == $member['mb_id'] || $is_admin)
|
||||
{
|
||||
set_session('ss_delete_comment_token', $token = uniqid(time()));
|
||||
$list[$i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&comment_id='.$row['wr_id'].'&token='.$token.'&page='.$page.$qstr;
|
||||
$list[$i]['is_edit'] = true;
|
||||
$list[$i]['is_del'] = true;
|
||||
@ -84,7 +82,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
else
|
||||
{
|
||||
if (!$row['mb_id']) {
|
||||
$list[$i]['del_link'] = './password.php?w=x&bo_table='.$bo_table.'&comment_id='.$row['wr_id'].'&page='.$page.$qstr;
|
||||
$list[$i]['del_link'] = './password.php?w=x&bo_table='.$bo_table.'&comment_id='.$row['wr_id'].'&token='.$token.'&page='.$page.$qstr;
|
||||
$list[$i]['is_del'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user