diff --git a/adm/admin.head.php b/adm/admin.head.php index f28edaa20..43dbbab17 100644 --- a/adm/admin.head.php +++ b/adm/admin.head.php @@ -131,7 +131,7 @@ function imageview(id, w, h) foreach($amenu as $key=>$value) { $href1 = $href2 = ''; - if ($menu['menu'.$key][0][2]) { + if (isset($menu['menu'.$key][0][2]) && $menu['menu'.$key][0][2]) { $href1 = ''; $href2 = ''; } else { diff --git a/adm/config_form.php b/adm/config_form.php index 32e779611..c14f294f5 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -339,14 +339,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - + - + @@ -357,79 +357,79 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - 점 + - 점 + - 자리만 표시 + 자리만 표시 - 수정하면 일 동안 바꿀 수 없음 + 수정하면 일 동안 바꿀 수 없음 - 수정하면 일 동안 바꿀 수 없음 + 수정하면 일 동안 바꿀 수 없음 - 일 + - 일 + - 일 + - 일 + - 분 + - 라인 + 라인 - 라인 + 라인 - 라인 + 라인 - 페이지씩 표시 + 페이지씩 표시 - 페이지씩 표시 + 페이지씩 표시 @@ -516,13 +516,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - reCAPTCHA 등록하기 + reCAPTCHA 등록하기 - + @@ -536,33 +536,33 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - 일 + 123.123.+ 도 입력 가능. (엔터로 구분)') ?> - + 123.123.+ 도 입력 가능. (엔터로 구분)') ?> - + - + - + @@ -605,7 +605,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - 초 지난후 가능 + 초 지난후 가능 @@ -619,46 +619,46 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - 점 + - 점 + - 점 + - 점 + - 건 단위로 검색 + 건 단위로 검색 - + - + - + - + @@ -733,11 +733,11 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - 점 + - 일 후 자동 삭제 + 일 후 자동 삭제 @@ -754,25 +754,25 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - 바이트 이하 + 바이트 이하 회원아이콘 사이즈 - + - + 픽셀 이하 - 바이트 이하 + 바이트 이하 회원이미지 사이즈 - + - + 픽셀 이하 @@ -780,27 +780,27 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { > 사용 - 점 + - + - + - + - + @@ -862,7 +862,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { 서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.
이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.
아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,
휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?> - KCB 아이핀 서비스 신청페이지 + KCB 아이핀 서비스 신청페이지 KCB 휴대폰 본인확인 서비스 신청페이지 @@ -871,7 +871,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { 서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?> SM - NHN KCP 휴대폰 본인확인 서비스 신청페이지 + NHN KCP 휴대폰 본인확인 서비스 신청페이지 @@ -879,21 +879,21 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { 서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 상점아이디를 발급 받으실 수 있습니다.
LG유플러스 휴대폰본인확인은 ActiveX 설치가 필요하므로 Internet Explorer 에서만 사용할 수 있습니다.') ?> si_ - LG유플러스 본인확인 서비스 신청페이지 + LG유플러스 본인확인 서비스 신청페이지 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.') ?> - + 회수제한은 실서비스에서 아이핀과 휴대폰 본인확인 인증에 개별 적용됩니다.
0 으로 설정하시면 회수제한이 적용되지 않습니다.'); ?> - 회 + 회 @@ -1138,73 +1138,73 @@ include_once('_rewrite_config_form.php'); - 앱 등록하기 + 앱 등록하기 - + - 앱 등록하기 + 앱 등록하기 - + - 앱 등록하기 + 앱 등록하기 - + - 앱 등록하기 + 앱 등록하기 - + - API Key 등록하기 + API Key 등록하기 - 앱 등록하기 + 앱 등록하기 - + - + - 앱 등록하기 + 앱 등록하기 - + @@ -1276,20 +1276,20 @@ include_once('_rewrite_config_form.php'); - + - + 요금제
(구버전) - + 충전 잔액
(구버전) 원. - 충전하기 + 충전하기 diff --git a/adm/config_form_update.php b/adm/config_form_update.php index d2564cd8a..cd31cb1e0 100644 --- a/adm/config_form_update.php +++ b/adm/config_form_update.php @@ -162,7 +162,11 @@ foreach( $check_keys as $k => $v ){ if( $v === 'int' ){ $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0; } else { - $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : ''; + if(in_array($k, array('cf_analytics', 'cf_add_meta', 'cf_add_script', 'cf_stipulation', 'cf_privacy'))){ + $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : ''; + } else { + $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : ''; + } } } diff --git a/adm/menu_list_update.php b/adm/menu_list_update.php index 9a3ecd499..f62ab4714 100644 --- a/adm/menu_list_update.php +++ b/adm/menu_list_update.php @@ -21,7 +21,11 @@ for ($i=0; $i<$count; $i++) { $_POST = array_map_deep('trim', $_POST); - $_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes($_POST['me_link'][$i], 1)) : ''; + if(preg_match('/^javascript/i', preg_replace('/[ ]{1,}|[\t]/', '', $_POST['me_link'][$i]))){ + $_POST['me_link'][$i] = G5_URL; + } + + $_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags(clean_xss_attributes(preg_replace('/[ ]{2,}|[\t]/', '', $_POST['me_link'][$i]), 1)) : ''; $code = is_array($_POST['code']) ? strip_tags($_POST['code'][$i]) : ''; $me_name = is_array($_POST['me_name']) ? strip_tags($_POST['me_name'][$i]) : ''; diff --git a/adm/qa_config_update.php b/adm/qa_config_update.php index 9f5869073..1f4f7d82c 100644 --- a/adm/qa_config_update.php +++ b/adm/qa_config_update.php @@ -61,9 +61,17 @@ if( function_exists('filter_input_include_path') ){ $qa_include_tail = filter_input_include_path($qa_include_tail); } +// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다. +$src_char = array('&', '='); +$dst_char = array('&', '〓'); +$qa_category = str_replace($src_char, $dst_char, $_POST['qa_category']); + +//https://github.com/gnuboard/gnuboard5/commit/f5f4925d4eb28ba1af728e1065fc2bdd9ce1da58 에 따른 조치 +$qa_category = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $qa_category); + $sql = " update {$g5['qa_config_table']} set qa_title = '{$_POST['qa_title']}', - qa_category = '{$_POST['qa_category']}', + qa_category = '{$qa_category}', qa_skin = '{$_POST['qa_skin']}', qa_mobile_skin = '{$_POST['qa_mobile_skin']}', qa_use_email = '{$_POST['qa_use_email']}', diff --git a/adm/view.php b/adm/view.php index 58db281e8..937318e16 100644 --- a/adm/view.php +++ b/adm/view.php @@ -11,7 +11,7 @@ if( ! $call ){ if( ! $is_admin ){ $sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' "; $row = sql_fetch($sql); - if ( ! $row['cnt']) { + if (! (isset($row['cnt']) && $row['cnt'])) { return; } } diff --git a/bbs/move_update.php b/bbs/move_update.php index dd5a6345a..097af6863 100644 --- a/bbs/move_update.php +++ b/bbs/move_update.php @@ -130,7 +130,20 @@ while ($row = sql_fetch_array($result)) { // 원본파일을 복사하고 퍼미션을 변경 // 제이프로님 코드제안 적용 - $copy_file_name = ($bo_table !== $move_bo_table) ? $row3['bf_file'] : $row2['wr_id'].'_copy_'.$insert_id.'_'.$row3['bf_file']; + + $copy_file_name = $row3['bf_file']; + + if($bo_table === $move_bo_table){ + if(preg_match('/_copy(\d+)?_(\d+)_/', $copy_file_name, $match)){ + + $number = isset($match[1]) ? (int) $match[1] : 0; + $replace_str = '_copy'.($number + 1).'_'.$insert_id.'_'; + $copy_file_name = preg_replace('/_copy(\d+)?_(\d+)_/', $replace_str, $copy_file_name); + } else { + $copy_file_name = $row2['wr_id'].'_copy_'.$insert_id.'_'.$row3['bf_file']; + } + } + $is_exist_file = is_file($src_dir.'/'.$row3['bf_file']) && file_exists($src_dir.'/'.$row3['bf_file']); if( $is_exist_file ){ @copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$copy_file_name); @@ -193,12 +206,12 @@ while ($row = sql_fetch_array($result)) $save[$cnt]['wr_id'] = $row2['wr_parent']; $cnt++; + + run_event('bbs_move_copy', $row2, $move_bo_table, $insert_id, $next_wr_num, $sw); } sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write + '$count_write' where bo_table = '$move_bo_table' "); sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + '$count_comment' where bo_table = '$move_bo_table' "); - - run_event('bbs_move_copy', $row2, $move_bo_table, $insert_id, $next_wr_num, $sw); delete_cache_latest($move_bo_table); } diff --git a/bbs/new_delete.php b/bbs/new_delete.php index faff90f42..0cf1d425c 100644 --- a/bbs/new_delete.php +++ b/bbs/new_delete.php @@ -53,9 +53,17 @@ for($i=0;$i<$count_chk_bn_id;$i++) // 업로드된 파일이 있다면 파일삭제 $sql2 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "; $result2 = sql_query($sql2); - while ($row2 = sql_fetch_array($result2)) - @unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']); + while ($row2 = sql_fetch_array($result2)){ + $delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row2['bf_file']), $row2); + if( file_exists($delete_file) ){ + @unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']); + } + // 이미지파일이면 썸네일삭제 + if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) { + delete_board_thumbnail($bo_table, $row2['bf_file']); + } + } // 파일테이블 행 삭제 sql_query(" delete from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "); @@ -63,9 +71,9 @@ for($i=0;$i<$count_chk_bn_id;$i++) } else { - // 코멘트 포인트 삭제 - if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '코멘트')) - insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 코멘트삭제"); + // 댓글 포인트 삭제 + if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '댓글')) + insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 댓글삭제"); $count_comment++; } @@ -120,8 +128,8 @@ for($i=0;$i<$count_chk_bn_id;$i++) $comment_reply = substr($write['wr_comment_reply'], 0, $len); // 코멘트 삭제 - if (!delete_point($write['mb_id'], $bo_table, $comment_id, '코멘트')) { - insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제"); + if (!delete_point($write['mb_id'], $bo_table, $comment_id, '댓글')) { + insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 댓글삭제"); } // 코멘트 삭제 diff --git a/bbs/qadelete.php b/bbs/qadelete.php index 3ce8580bd..af92640eb 100644 --- a/bbs/qadelete.php +++ b/bbs/qadelete.php @@ -45,7 +45,7 @@ for($i=0; $i<$count; $i++) { // 첨부파일 삭제 for($k=1; $k<=2; $k++) { - @unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]); + @unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($row['qa_file'.$k])); // 썸네일삭제 if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['qa_file'.$k])) { delete_qa_thumbnail($row['qa_file'.$k]); @@ -60,7 +60,7 @@ for($i=0; $i<$count; $i++) { $row2 = sql_fetch(" select qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_parent = '$qa_id' "); // 첨부파일 삭제 for($k=1; $k<=2; $k++) { - @unlink(G5_DATA_PATH.'/qa/'.$row2['qa_file'.$k]); + @unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($row2['qa_file'.$k])); // 썸네일삭제 if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['qa_file'.$k])) { delete_qa_thumbnail($row2['qa_file'.$k]); diff --git a/bbs/qawrite_update.php b/bbs/qawrite_update.php index 021cd3d4d..ab0b9b3a7 100644 --- a/bbs/qawrite_update.php +++ b/bbs/qawrite_update.php @@ -157,7 +157,7 @@ for ($i=1; $i<=$upload_count; $i++) { // 삭제에 체크가 되어있다면 파일을 삭제합니다. if (isset($_POST['bf_file_del'][$i]) && $_POST['bf_file_del'][$i]) { $upload[$i]['del_check'] = true; - @unlink(G5_DATA_PATH.'/qa/'.$write['qa_file'.$i]); + @unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($write['qa_file'.$i])); // 썸네일삭제 if(preg_match("/\.({$config['cf_image_extension']})$/i", $write['qa_file'.$i])) { delete_qa_thumbnail($write['qa_file'.$i]); @@ -204,7 +204,7 @@ for ($i=1; $i<=$upload_count; $i++) { if ($w == 'u') { // 존재하는 파일이 있다면 삭제합니다. - @unlink(G5_DATA_PATH.'/qa/'.$write['qa_file'.$i]); + @unlink(G5_DATA_PATH.'/qa/'.clean_relative_paths($write['qa_file'.$i])); // 이미지파일이면 썸네일삭제 if(preg_match("/\.({$config['cf_image_extension']})$/i", $write['qa_file'.$i])) { delete_qa_thumbnail($row['qa_file'.$i]); @@ -244,7 +244,7 @@ if($w == '' || $w == 'a' || $w == 'r') { $qa_num = $write['qa_num']; $qa_parent = $write['qa_id']; $qa_related = $write['qa_related']; - $qa_category = $write['qa_category']; + $qa_category = addslashes($write['qa_category']); $qa_type = 1; $qa_status = 1; } diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index 51c3bc9d9..5f912da5e 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -557,8 +557,8 @@ if($w == '' && $default['de_member_reg_coupon_use'] && $default['de_member_reg_c if(isset($_SESSION['ss_cert_type'])) unset($_SESSION['ss_cert_type']); if(isset($_SESSION['ss_cert_no'])) unset($_SESSION['ss_cert_no']); if(isset($_SESSION['ss_cert_hash'])) unset($_SESSION['ss_cert_hash']); -if(isset($_SESSION['ss_cert_hash'])) unset($_SESSION['ss_cert_birth']); -if(isset($_SESSION['ss_cert_hash'])) unset($_SESSION['ss_cert_adult']); +if(isset($_SESSION['ss_cert_birth'])) unset($_SESSION['ss_cert_birth']); +if(isset($_SESSION['ss_cert_adult'])) unset($_SESSION['ss_cert_adult']); if ($msg) echo ''; diff --git a/config.php b/config.php index 71480a867..e85e880f1 100644 --- a/config.php +++ b/config.php @@ -5,8 +5,8 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.4.5.1'); -define('G5_YOUNGCART_VER', '5.4.5.1'); +define('G5_GNUBOARD_VER', '5.4.5.2'); +define('G5_YOUNGCART_VER', '5.4.5.2'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index 51ab51453..f983100ff 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -227,7 +227,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h return; $size = @getimagesize($source_file); - if($size[2] < 1 || $size[2] > 3) // gif, jpg, png 에 대해서만 적용 + if(!isset($size[2]) || $size[2] < 1 || $size[2] > 3) // gif, jpg, png 에 대해서만 적용 return; if (!is_dir($target_path)) { diff --git a/mobile/skin/board/basic/view.skin.php b/mobile/skin/board/basic/view.skin.php index f72574070..8a3f2dd57 100644 --- a/mobile/skin/board/basic/view.skin.php +++ b/mobile/skin/board/basic/view.skin.php @@ -143,7 +143,7 @@ jQuery(function($){ if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) { ?>
  • - + () diff --git a/mobile/skin/board/gallery/view.skin.php b/mobile/skin/board/gallery/view.skin.php index d75600e81..37237904e 100644 --- a/mobile/skin/board/gallery/view.skin.php +++ b/mobile/skin/board/gallery/view.skin.php @@ -145,7 +145,7 @@ jQuery(function($){ if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) { ?>
  • - + () diff --git a/plugin/social/register_member.php b/plugin/social/register_member.php index 3c62ce00b..45662b631 100644 --- a/plugin/social/register_member.php +++ b/plugin/social/register_member.php @@ -26,6 +26,11 @@ $user_nick = social_relace_nick($user_profile->displayName); $user_email = isset($user_profile->emailVerified) ? $user_profile->emailVerified : $user_profile->email; $user_id = $user_profile->sid ? preg_replace("/[^0-9a-z_]+/i", "", $user_profile->sid) : get_social_convert_id($user_profile->identifier, $provider_name); +if(! $user_nick) { + $tmp = explode('_', $user_id); + $user_nick = $tmp[1]; +} + //$is_exists_id = exist_mb_id($user_id); //$is_exists_name = exist_mb_nick($user_nick, ''); $user_id = exist_mb_id_recursive($user_id); diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php index cbf54f971..ffe1ef78f 100644 --- a/skin/board/basic/view.skin.php +++ b/skin/board/basic/view.skin.php @@ -161,7 +161,7 @@ add_stylesheet('', 0 ?>
  • - + ()
    diff --git a/skin/board/gallery/view.skin.php b/skin/board/gallery/view.skin.php index 293af3bf1..e94e3f08b 100644 --- a/skin/board/gallery/view.skin.php +++ b/skin/board/gallery/view.skin.php @@ -161,7 +161,7 @@ add_stylesheet('', 0 ?>
  • - + ()
    diff --git a/theme/basic/mobile/skin/board/basic/view.skin.php b/theme/basic/mobile/skin/board/basic/view.skin.php index f72574070..8a3f2dd57 100644 --- a/theme/basic/mobile/skin/board/basic/view.skin.php +++ b/theme/basic/mobile/skin/board/basic/view.skin.php @@ -143,7 +143,7 @@ jQuery(function($){ if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) { ?>
  • - + () diff --git a/theme/basic/mobile/skin/board/gallery/view.skin.php b/theme/basic/mobile/skin/board/gallery/view.skin.php index d75600e81..37237904e 100644 --- a/theme/basic/mobile/skin/board/gallery/view.skin.php +++ b/theme/basic/mobile/skin/board/gallery/view.skin.php @@ -145,7 +145,7 @@ jQuery(function($){ if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) { ?>
  • - + () diff --git a/theme/basic/skin/board/basic/view.skin.php b/theme/basic/skin/board/basic/view.skin.php index cbf54f971..ffe1ef78f 100644 --- a/theme/basic/skin/board/basic/view.skin.php +++ b/theme/basic/skin/board/basic/view.skin.php @@ -161,7 +161,7 @@ add_stylesheet('', 0 ?>
  • - + ()
    diff --git a/theme/basic/skin/board/gallery/view.skin.php b/theme/basic/skin/board/gallery/view.skin.php index 293af3bf1..e94e3f08b 100644 --- a/theme/basic/skin/board/gallery/view.skin.php +++ b/theme/basic/skin/board/gallery/view.skin.php @@ -161,7 +161,7 @@ add_stylesheet('', 0 ?>
  • - + ()