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/shop_admin/ajax.orderitem.php b/adm/shop_admin/ajax.orderitem.php index 2cf8d85f6..835182ff7 100644 --- a/adm/shop_admin/ajax.orderitem.php +++ b/adm/shop_admin/ajax.orderitem.php @@ -9,7 +9,7 @@ $od_id = isset($_POST['od_id']) ? safe_replace_regex($_POST['od_id'], 'od_id') : $sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "; $od = sql_fetch($sql); -if(!$od['od_id']) +if(! ($od['od_id'] && $od['od_id'])) die('
주문정보가 존재하지 않습니다.
'); // 상품목록 @@ -100,6 +100,7 @@ $result = sql_query($sql); $opt_price = $opt['ct_price'] + $opt['io_price']; // 소계 + $opt['ct_point'] = isset($opt['ct_point']) ? (int) $opt['ct_point'] : 0; $ct_price['stotal'] = $opt_price * $opt['ct_qty']; $ct_point['stotal'] = $opt['ct_point'] * $opt['ct_qty']; ?> diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index 7e1dc9bd6..057a4b568 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -357,13 +357,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -376,13 +376,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -395,13 +395,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -414,13 +414,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -433,13 +433,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -477,13 +477,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -495,13 +495,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -514,13 +514,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -533,13 +533,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -552,13 +552,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -711,14 +711,14 @@ if(!$default['de_kakaopay_cancelpwd']){ - 점 + 점 - 점 + 점 @@ -746,7 +746,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - 주문 완료 일 이후에 포인트를 지급 + 주문 완료 일 이후에 포인트를 지급 @@ -768,14 +768,14 @@ if(!$default['de_kakaopay_cancelpwd']){ - SR 영대문자, 숫자 혼용 3자리 + SR 영대문자, 숫자 혼용 3자리 - + @@ -801,14 +801,14 @@ if(!$default['de_kakaopay_cancelpwd']){ 기본환경설정 > 본인확인 설정의 토스페이먼츠 상점아이디와 동일합니다."); ?> - si_ 영문자, 숫자 혼용 + si_ 영문자, 숫자 혼용 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n기본환경설정 > 본인확인 설정의 토스페이먼츠 MERT KEY와 동일합니다."); ?> - + @@ -825,14 +825,14 @@ if(!$default['de_kakaopay_cancelpwd']){ - + 상점정보 > 계약정보 > 부가정보의 웹결제 signkey생성 조회 버튼 클릭, 팝업창에서 생성 버튼 클릭 후 해당 값을 입력합니다."); ?> - + @@ -879,21 +879,21 @@ if(!$default['de_kakaopay_cancelpwd']){ - SIRK + SIRK 상점정보 > 계약정보 > 부가정보의 웹결제 signkey생성 조회 버튼 클릭, 팝업창에서 생성 버튼 클릭 후 해당 값을 입력합니다."); ?> - + - + @@ -909,7 +909,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - + @@ -919,7 +919,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - + @@ -928,7 +928,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - + @@ -937,7 +937,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - + @@ -956,7 +956,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - + @@ -972,7 +972,7 @@ if(!$default['de_kakaopay_cancelpwd']){ 예) 제주도 3,000원 추가, 제주도 외 도서·산간 지역 5,000원 추가"); ?> - + @@ -1088,13 +1088,13 @@ if(!$default['de_kakaopay_cancelpwd']){ ; 로 구분합니다.\n\n예를 들어 20000원 미만일 경우 4000원, 30000원 미만일 경우 3000원 으로 사용할 경우에는 배송비상한가를 20000;30000 으로 입력하고 배송비를 4000;3000 으로 입력합니다."); ?> - 원 + 원 - 원 + 원 @@ -1111,7 +1111,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - 일 + 일 @@ -1149,11 +1149,11 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + > @@ -1167,11 +1167,11 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + > @@ -1184,13 +1184,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -1201,13 +1201,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -1218,13 +1218,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -1235,13 +1235,13 @@ if(!$default['de_kakaopay_cancelpwd']){ - + - + - + - + @@ -1249,10 +1249,10 @@ if(!$default['de_kakaopay_cancelpwd']){ - 픽셀 + 픽셀 / - 픽셀 + 픽셀 @@ -1260,10 +1260,10 @@ if(!$default['de_kakaopay_cancelpwd']){ - 픽셀 + 픽셀 / - 픽셀 + 픽셀 @@ -1400,7 +1400,7 @@ if(!$default['de_kakaopay_cancelpwd']){ - 일 + 일 @@ -1417,11 +1417,11 @@ if(!$default['de_kakaopay_cancelpwd']){ > - 원 + 원 - 원이상 + 원이상 - 일 + 일 @@ -1578,27 +1578,27 @@ function byte_check(el_cont, el_byte) - + - + - + "> 요금제
(구버전) - + SMS 전송유형을 LMS로 설정시 90바이트 이내는 SMS, 90 ~ 2000 바이트는 LMS 그 이상은 절삭 되어 LMS로 발송됩니다."); ?> - + 토큰키관리 메뉴에서 생성한 토큰키를 입력합니다."); ?>
서버아이피 : diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index b5e1a3567..3d31db95c 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -235,6 +235,7 @@ $check_sanitize_keys = array( 'de_sms_use5', //SMS 상품배송시 고객님께 발송 'cf_icode_server_ip', // 아이코드 ip 'cf_icode_server_port', // 아이코드 port +'cf_icode_token_key', // 아이코드 토큰키 (JSON버전) ); foreach( $check_sanitize_keys as $key ){ diff --git a/adm/shop_admin/itemformupdate.php b/adm/shop_admin/itemformupdate.php index 655a3cf26..8fd5402a5 100644 --- a/adm/shop_admin/itemformupdate.php +++ b/adm/shop_admin/itemformupdate.php @@ -281,8 +281,8 @@ if($supply_count) { $value_array = array(); $count_ii_article = (isset($_POST['ii_article']) && is_array($_POST['ii_article'])) ? count($_POST['ii_article']) : 0; for($i=0; $i<$count_ii_article; $i++) { - $key = isset($_POST['ii_article'][$i]) ? $_POST['ii_article'][$i] : ''; - $val = isset($_POST['ii_value'][$i]) ? $_POST['ii_value'][$i] : ''; + $key = isset($_POST['ii_article'][$i]) ? strip_tags($_POST['ii_article'][$i], '
') : ''; + $val = isset($_POST['ii_value'][$i]) ? strip_tags($_POST['ii_value'][$i], '
') : ''; $value_array[$key] = $val; } $it_info_value = addslashes(serialize($value_array)); diff --git a/adm/shop_admin/iteminfo.php b/adm/shop_admin/iteminfo.php index fddc110d9..ea84c9458 100644 --- a/adm/shop_admin/iteminfo.php +++ b/adm/shop_admin/iteminfo.php @@ -53,7 +53,7 @@ if(isset($it['it_id']) && $it['it_id']) { - + diff --git a/adm/shop_admin/itemuseformupdate.php b/adm/shop_admin/itemuseformupdate.php index c4ebc34f6..2246bcfc6 100644 --- a/adm/shop_admin/itemuseformupdate.php +++ b/adm/shop_admin/itemuseformupdate.php @@ -15,7 +15,12 @@ $posts = array(); $check_keys = array('is_subject', 'is_content', 'is_confirm', 'is_reply_subject', 'is_reply_content', 'is_id'); foreach($check_keys as $key){ - $posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : ''; + + if( in_array($key, array('is_content', 'is_reply_content')) ){ + $posts[$key] = isset($_POST[$key]) ? $_POST[$key] : ''; + } else { + $posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : ''; + } } if ($w == "u") 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/delete.php b/bbs/delete.php index 94f5ff665..d3bb6b438 100644 --- a/bbs/delete.php +++ b/bbs/delete.php @@ -111,7 +111,7 @@ while ($row = sql_fetch_array($result)) } } -// 게시글 삭제 +// 게시글과 댓글 삭제 sql_query(" delete from $write_table where wr_parent = '{$write['wr_id']}' "); // 최근게시물 삭제 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..cb76f96ba 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.3'); +define('G5_YOUNGCART_VER', '5.4.5.3'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); diff --git a/lib/mailer.lib.php b/lib/mailer.lib.php index 229ed97d9..10a0fcc46 100644 --- a/lib/mailer.lib.php +++ b/lib/mailer.lib.php @@ -18,35 +18,48 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file="", $cc= $result = run_replace('mailer', $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc); - if( isset($result['return']) ){ + if( is_array($result) && isset($result['return']) ){ return $result['return']; } - $mail = new PHPMailer(); // defaults to using php "mail()" - if (defined('G5_SMTP') && G5_SMTP) { - $mail->IsSMTP(); // telling the class to use SMTP - $mail->Host = G5_SMTP; // SMTP server - if(defined('G5_SMTP_PORT') && G5_SMTP_PORT) - $mail->Port = G5_SMTP_PORT; - } - $mail->CharSet = 'UTF-8'; - $mail->From = $fmail; - $mail->FromName = $fname; - $mail->Subject = $subject; - $mail->AltBody = ""; // optional, comment out and test - $mail->msgHTML($content); - $mail->addAddress($to); - if ($cc) - $mail->addCC($cc); - if ($bcc) - $mail->addBCC($bcc); - //print_r2($file); exit; - if ($file != "") { - foreach ($file as $f) { - $mail->addAttachment($f['path'], $f['name']); + $mail_send_result = false; + + try { + $mail = new PHPMailer(); // defaults to using php "mail()" + if (defined('G5_SMTP') && G5_SMTP) { + $mail->IsSMTP(); // telling the class to use SMTP + $mail->Host = G5_SMTP; // SMTP server + if(defined('G5_SMTP_PORT') && G5_SMTP_PORT) + $mail->Port = G5_SMTP_PORT; } + $mail->CharSet = 'UTF-8'; + $mail->From = $fmail; + $mail->FromName = $fname; + $mail->Subject = $subject; + $mail->AltBody = ""; // optional, comment out and test + $mail->msgHTML($content); + $mail->addAddress($to); + if ($cc) + $mail->addCC($cc); + if ($bcc) + $mail->addBCC($bcc); + //print_r2($file); exit; + if ($file != "") { + foreach ($file as $f) { + $mail->addAttachment($f['path'], $f['name']); + } + } + + $mail = run_replace('mail_options', $mail, $fname, $fmail, $to, $subject, $content, $type, $file, $cc, $bcc); + + $mail_send_result = $mail->send(); + + } catch (Exception $e) { } - return $mail->send(); + + run_event('mail_send_result', $mail_send_result, $mail, $to, $cc, $bcc); + + return $mail_send_result; } // 파일을 첨부함 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/editor/cheditor5/imageUpload/upload.php b/plugin/editor/cheditor5/imageUpload/upload.php index 0c345ed86..0d675e91b 100644 --- a/plugin/editor/cheditor5/imageUpload/upload.php +++ b/plugin/editor/cheditor5/imageUpload/upload.php @@ -69,6 +69,8 @@ if( !$is_editor_upload ){ exit; } +run_event('cheditor_photo_upload', $data_dir, $data_url); + //---------------------------------------------------------------------------- // // diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php index 510ac0f24..65d69c051 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php @@ -40,6 +40,8 @@ if( isset($_GET['_nonce']) && ft_nonce_is_valid( $_GET['_nonce'] , 'smarteditor' } if( $is_editor_upload ) { + + run_event('smarteditor_photo_upload', $data_dir, $data_url); require('UploadHandler.php'); $options = array( diff --git a/plugin/lgxpay/AuthOnlyRes.php b/plugin/lgxpay/AuthOnlyRes.php index 1e0a94489..f5696237b 100644 --- a/plugin/lgxpay/AuthOnlyRes.php +++ b/plugin/lgxpay/AuthOnlyRes.php @@ -129,7 +129,7 @@ if ($xpay->TX()) { if($mb_dupinfo) { $sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}' "; $row = sql_fetch($sql); - if ($row['mb_id']) { + if (isset($row['mb_id']) && $row['mb_id']) { alert_close("입력하신 본인확인 정보로 가입된 내역이 존재합니다.\\n회원아이디 : ".$row['mb_id']); } } diff --git a/plugin/sms5/sms5.lib.php b/plugin/sms5/sms5.lib.php index e9a22330d..1165fa82b 100644 --- a/plugin/sms5/sms5.lib.php +++ b/plugin/sms5/sms5.lib.php @@ -162,10 +162,15 @@ if($config['cf_sms_type'] == 'LMS') { var $Log = array(); function Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate="", $nCount) { - // EUC-KR로 변환 - $strCaller = iconv_euckr($strCaller); - $strSubject = iconv_euckr($strSubject); - $strData = iconv_euckr($strData); + global $config; + + // 아이코드 JSON 모듈은 UTF-8 을 사용하며, sms 또는 lms 는 euc-kr 로 사용한다. + if(! (isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'])){ + // EUC-KR로 변환 + $strCaller = iconv_euckr($strCaller); + $strSubject = iconv_euckr($strSubject); + $strData = iconv_euckr($strData); + } return parent::Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount); } 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/shop/index.php b/shop/index.php index ff2fa2c58..ebb3662cf 100644 --- a/shop/index.php +++ b/shop/index.php @@ -46,7 +46,13 @@ include_once(G5_SHOP_PATH.'/shop.head.php');