Merge branch 'master' of github.com:gnuboard/g5
This commit is contained in:
@ -11,7 +11,10 @@ set_cookie('ck_auto', '', 0);
|
||||
// 자동로그인 해제 end --------------------------------
|
||||
|
||||
if ($url) {
|
||||
$p = @parse_url($url);
|
||||
if ( substr($url, 0, 2) == '//' )
|
||||
$url = 'http:' . $url;
|
||||
|
||||
$p = @parse_url(urldecode($url));
|
||||
if ($p['scheme'] || $p['host']) {
|
||||
alert('url에 도메인을 지정할 수 없습니다.');
|
||||
}
|
||||
|
||||
@ -4,6 +4,8 @@ include_once('./_common.php');
|
||||
if ($is_guest)
|
||||
alert_close('회원만 이용하실 수 있습니다.');
|
||||
|
||||
set_session('ss_memo_delete_token', $token = uniqid(time()));
|
||||
|
||||
$g5['title'] = '내 쪽지함';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
@ -65,7 +67,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$list[$i]['send_datetime'] = $send_datetime;
|
||||
$list[$i]['read_datetime'] = $read_datetime;
|
||||
$list[$i]['view_href'] = './memo_view.php?me_id='.$row['me_id'].'&kind='.$kind;
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&kind='.$kind;
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&token='.$token.'&kind='.$kind;
|
||||
}
|
||||
|
||||
include_once($member_skin_path.'/memo.skin.php');
|
||||
|
||||
@ -4,6 +4,12 @@ include_once('./_common.php');
|
||||
if (!$is_member)
|
||||
alert('회원만 이용하실 수 있습니다.');
|
||||
|
||||
$delete_token = get_session('ss_memo_delete_token');
|
||||
set_session('ss_memo_delete_token', '');
|
||||
|
||||
if (!($token && $delete_token == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
|
||||
$me_id = (int)$_REQUEST['me_id'];
|
||||
|
||||
$sql = " select * from {$g5['memo_table']} where me_id = '{$me_id}' ";
|
||||
|
||||
@ -4,6 +4,12 @@ include_once('./_common.php');
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 주십시오.', G5_URL);
|
||||
|
||||
$delete_token = get_session('ss_qa_delete_token');
|
||||
set_session('ss_qa_delete_token', '');
|
||||
|
||||
if (!($token && $delete_token == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
|
||||
$tmp_array = array();
|
||||
if ($qa_id) // 건별삭제
|
||||
$tmp_array[0] = $qa_id;
|
||||
|
||||
@ -109,7 +109,8 @@ if(is_file($skin_file)) {
|
||||
*/
|
||||
if(($view['qa_type'] && $is_admin) || (!$view['qa_type'] && $view['qa_status'] == 0)) {
|
||||
$update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$view['qa_id'].$qstr;
|
||||
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].$qstr;
|
||||
set_session('ss_qa_delete_token', $token = uniqid(time()));
|
||||
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].'&token='.$token.$qstr;
|
||||
}
|
||||
|
||||
// 질문글이고 등록된 답변이 있다면
|
||||
|
||||
@ -200,7 +200,7 @@ for ($i=1; $i<=count($_FILES['bf_file']['name']); $i++) {
|
||||
$upload[$i]['filesize'] = $filesize;
|
||||
|
||||
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
|
||||
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
|
||||
shuffle($chars_array);
|
||||
$shuffle = implode('', $chars_array);
|
||||
|
||||
@ -524,7 +524,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
$upload[$i]['filesize'] = $filesize;
|
||||
|
||||
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
|
||||
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
|
||||
shuffle($chars_array);
|
||||
$shuffle = implode('', $chars_array);
|
||||
|
||||
Reference in New Issue
Block a user