From a6a2183c7d2aca3aae0b84a6f7d279492269b927 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 10 Mar 2015 13:47:21 +0900 Subject: [PATCH 01/10] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C=205.?= =?UTF-8?q?0.31=20=EC=88=98=EC=A0=95=EB=82=B4=EC=97=AD=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/point_clear.php | 64 ---------------------- adm/point_list.php | 11 ---- bbs/rss.php | 4 +- common.php | 4 +- config.php | 4 +- lib/thumbnail.lib.php | 16 ++++-- mobile/skin/connect/basic/connect.skin.php | 1 - mobile/tail.php | 5 +- skin/board/basic/style.css | 2 +- skin/board/gallery/style.css | 2 +- skin/faq/basic/style.css | 2 +- skin/qa/basic/style.css | 2 +- skin/search/basic/style.css | 4 +- tail.php | 5 +- 14 files changed, 30 insertions(+), 96 deletions(-) delete mode 100644 adm/point_clear.php diff --git a/adm/point_clear.php b/adm/point_clear.php deleted file mode 100644 index 22b5d25d7..000000000 --- a/adm/point_clear.php +++ /dev/null @@ -1,64 +0,0 @@ -'; -include_once('./admin.tail.php'); -flush(); - -echo ''."\n"; -flush(); - -$max_count = 50; - -// 테이블 락을 걸고 -$sql = " LOCK TABLES {$g5['member_table']} WRITE, {$g5['point_table']} WRITE "; -sql_query($sql); - -$sql = " select mb_id, count(po_point) as cnt - from {$g5['point_table']} - group by mb_id - having cnt > {$max_count}+1 - order by cnt "; -$result = sql_query($sql); -for ($i=0; $row=sql_fetch_array($result); $i++) -{ - $count = 0; - $total = 0; - $sql2 = " select po_id, po_point - from {$g5['point_table']} - where mb_id = '{$row['mb_id']}' - order by po_id desc - limit {$max_count}, {$row['cnt']} "; - $result2 = sql_query($sql2); - for ($k=0; $row2=sql_fetch_array($result2); $k++) - { - $count++; - $total += $row2['po_point']; - - sql_query(" delete from {$g5['point_table']} where po_id = '{$row2['po_id']}' "); - } - - insert_point($row['mb_id'], $total, '포인트 {$count}건 정리', '@clear', $row['mb_id'], G5_TIME_YMD."-".uniqid("")); - - $str = $row['mb_id']."님 포인트 내역 ".number_format($count)."건 ".number_format($total)."점 정리
"; - echo ''."\n"; - flush(); -} - -// 테이블 락을 풀고 -$sql = " UNLOCK TABLES "; -sql_query($sql); - -echo ''."\n"; -?> diff --git a/adm/point_list.php b/adm/point_list.php index 08f44d5b1..084c5ad09 100644 --- a/adm/point_list.php +++ b/adm/point_list.php @@ -70,16 +70,6 @@ else $mb_id = ""; ?> - -
전체 건 @@ -91,7 +81,6 @@ function point_clear() echo ' (전체 합계 '.number_format($row2['sum_point']).'점)'; } ?> -
diff --git a/bbs/rss.php b/bbs/rss.php index 6bf5b1b55..04c9428fb 100644 --- a/bbs/rss.php +++ b/bbs/rss.php @@ -43,7 +43,7 @@ $sql = " select gr_subject from {$g5['group_table']} where gr_id = '{$row['gr_id $row = sql_fetch($sql); $subj1 = specialchars_replace($row['gr_subject'], 255); -echo ''."\n"; +echo ''."\n"; ?> @@ -87,4 +87,4 @@ $date = date('r', strtotime($date)); echo ''."\n"; echo ''."\n"; -?> \ No newline at end of file +?> diff --git a/common.php b/common.php index 8a69c4539..f4fd07275 100644 --- a/common.php +++ b/common.php @@ -287,7 +287,7 @@ if (isset($_REQUEST['sca'])) { if (isset($_REQUEST['sfl'])) { $sfl = trim($_REQUEST['sfl']); - $sfl = preg_replace("/[\<\>\'\"\%\=\(\)\s]/", "", $sfl); + $sfl = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\s]/", "", $sfl); if ($sfl) $qstr .= '&sfl=' . urlencode($sfl); // search field (검색 필드) } else { @@ -305,7 +305,7 @@ if (isset($_REQUEST['stx'])) { // search text (검색어) if (isset($_REQUEST['sst'])) { $sst = trim($_REQUEST['sst']); - $sst = preg_replace("/[\<\>\'\"\%\=\(\)\s]/", "", $sst); + $sst = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\s]/", "", $sst); if ($sst) $qstr .= '&sst=' . urlencode($sst); // search sort (검색 정렬 필드) } else { diff --git a/config.php b/config.php index 6c2dfc6a1..edcd085b0 100644 --- a/config.php +++ b/config.php @@ -165,8 +165,8 @@ define('G5_SMTP', '127.0.0.1'); ********************/ // SQL 에러를 표시할 것인지 지정 -// 에러를 표시하지 않으려면 FALSE 로 변경 -define('G5_DISPLAY_SQL_ERROR', TRUE); +// 에러를 표시하려면 TRUE 로 변경 +define('G5_DISPLAY_SQL_ERROR', FALSE); // escape string 처리 함수 지정 // addslashes 로 변경 가능 diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index b9a5c4abf..15ad429fc 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -333,11 +333,14 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h if($size[2] == 3) { imagealphablending($dst, false); imagesavealpha($dst, true); - } else if($size[2] == 1 && $src_transparency != -1) { - $transparent_color = imagecolorsforindex($src, $src_transparency); - $current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); - imagefill($dst, 0, 0, $current_transparent); - imagecolortransparent($dst, $current_transparent); + } else if($size[2] == 1) { + $palletsize = imagecolorstotal($src); + if($src_transparency >= 0 && $src_transparency < $palletsize) { + $transparent_color = imagecolorsforindex($src, $src_transparency); + $current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); + imagefill($dst, 0, 0, $current_transparent); + imagecolortransparent($dst, $current_transparent); + } } } else { $dst = imagecreatetruecolor($dst_w, $dst_h); @@ -367,7 +370,8 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h imagealphablending($dst, false); imagesavealpha($dst, true); } else if($size[2] == 1) { - if($src_transparency != -1) { + $palletsize = imagecolorstotal($src); + if($src_transparency >= 0 && $src_transparency < $palletsize) { $transparent_color = imagecolorsforindex($src, $src_transparency); $current_transparent = imagecolorallocate($dst, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']); imagefill($dst, 0, 0, $current_transparent); diff --git a/mobile/skin/connect/basic/connect.skin.php b/mobile/skin/connect/basic/connect.skin.php index 55849443c..96d2da394 100644 --- a/mobile/skin/connect/basic/connect.skin.php +++ b/mobile/skin/connect/basic/connect.skin.php @@ -5,5 +5,4 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('', 0); ?> - diff --git a/mobile/tail.php b/mobile/tail.php index 6ada54bbd..ceecca3fd 100644 --- a/mobile/tail.php +++ b/mobile/tail.php @@ -28,7 +28,10 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if(G5_DEVICE_BUTTON_DISPLAY && G5_IS_MOBILE) { $seq = 0; $p = parse_url(G5_URL); - $href = $p['scheme'].'://'.$p['host'].$_SERVER['PHP_SELF']; + $href = $p['scheme'].'://'.$p['host']; + if(isset($p['port']) && $p['port']) + $href .= ':'.$p['port']; + $href .= $_SERVER['PHP_SELF']; if($_SERVER['QUERY_STRING']) { $sep = '?'; foreach($_GET as $key=>$val) { diff --git a/skin/board/basic/style.css b/skin/board/basic/style.css index 29a31a5f4..8d63d833f 100644 --- a/skin/board/basic/style.css +++ b/skin/board/basic/style.css @@ -107,7 +107,7 @@ #bo_list .txt_expired {color:#ccc} #bo_cate h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} -#bo_cate ul {margin-bottom:10px;padding-left:1px;width:728px;zoom:1} +#bo_cate ul {margin-bottom:10px;padding-left:1px;zoom:1} #bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""} #bo_cate li {float:left;margin-bottom:-1px} #bo_cate a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:90px;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer} diff --git a/skin/board/gallery/style.css b/skin/board/gallery/style.css index 43bea9758..5701375da 100644 --- a/skin/board/gallery/style.css +++ b/skin/board/gallery/style.css @@ -79,7 +79,7 @@ /* 게시판 목록 */ #bo_cate h2 {width:1px;height:1px;font-size:0;line-height:0;overflow:hidden} -#bo_cate ul {margin-bottom:10px;padding-left:1px;width:728px;zoom:1} +#bo_cate ul {margin-bottom:10px;padding-left:1px;zoom:1} #bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""} #bo_cate li {float:left;margin-bottom:-1px} #bo_cate a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:90px;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer} diff --git a/skin/faq/basic/style.css b/skin/faq/basic/style.css index d2c7a16f5..35168de92 100644 --- a/skin/faq/basic/style.css +++ b/skin/faq/basic/style.css @@ -1,7 +1,7 @@ @charset "utf-8"; #bo_cate h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} -#bo_cate ul {margin-bottom:10px;padding-left:1px;width:728px;zoom:1} +#bo_cate ul {margin-bottom:10px;padding-left:1px;zoom:1} #bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""} #bo_cate li {float:left;margin-bottom:-1px} #bo_cate a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:90px;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer} diff --git a/skin/qa/basic/style.css b/skin/qa/basic/style.css index 1d383415f..8f7022428 100644 --- a/skin/qa/basic/style.css +++ b/skin/qa/basic/style.css @@ -107,7 +107,7 @@ #bo_list .txt_expired {color:#ccc} #bo_cate h2 {position:absolute;font-size:0;line-height:0;overflow:hidden} -#bo_cate ul {margin-bottom:10px;padding-left:1px;width:728px;zoom:1} +#bo_cate ul {margin-bottom:10px;padding-left:1px;zoom:1} #bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""} #bo_cate li {float:left;margin-bottom:-1px} #bo_cate a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:90px;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer} diff --git a/skin/search/basic/style.css b/skin/search/basic/style.css index 10de1ac5c..8adf23a45 100644 --- a/skin/search/basic/style.css +++ b/skin/search/basic/style.css @@ -12,10 +12,10 @@ #sch_res_ov dd {float:left;margin:0 10px 0 5px} #sch_res_ov p {float:right;margin:0;padding:0;line-height:1em} -#sch_res_board {margin:0 0 10px;padding-left:1px;width:728px;list-style:none;zoom:1} +#sch_res_board {margin:0 0 10px;padding-left:1px;list-style:none;zoom:1} #sch_res_board:after {display:block;visibility:hidden;clear:both;content:""} #sch_res_board li {float:left;margin-bottom:-1px} -#sch_res_board a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:181px;border:1px solid #ddd;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer} +#sch_res_board a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:180px;border:1px solid #ddd;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer} #sch_res_board a:focus, #sch_res_board a:hover, #sch_res_board a:active {text-decoration:none} #sch_res_board .cnt_cmt {font-weight:normal !important} diff --git a/tail.php b/tail.php index f4b57a4c9..8418253c6 100644 --- a/tail.php +++ b/tail.php @@ -41,7 +41,10 @@ if (G5_IS_MOBILE) { if(G5_DEVICE_BUTTON_DISPLAY && !G5_IS_MOBILE) { $seq = 0; $p = parse_url(G5_URL); - $href = $p['scheme'].'://'.$p['host'].$_SERVER['PHP_SELF']; + $href = $p['scheme'].'://'.$p['host']; + if(isset($p['port']) && $p['port']) + $href .= ':'.$p['port']; + $href .= $_SERVER['PHP_SELF']; if($_SERVER['QUERY_STRING']) { $sep = '?'; foreach($_GET as $key=>$val) { From 9fd14cfc17ba978c2fb8f15a83690501cf1dd3fa Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 9 Apr 2015 09:16:36 +0900 Subject: [PATCH 02/10] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C=205.?= =?UTF-8?q?0.32=20=EC=88=98=EC=A0=95=EB=82=B4=EC=97=AD=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/board_form.php | 12 ++++++------ adm/sms_admin/history_send.php | 2 +- adm/sms_admin/sms_write.php | 9 ++++++++- adm/sms_admin/sms_write_send.php | 9 ++++++--- js/common.js | 4 ++-- lib/common.lib.php | 3 ++- plugin/sms5/write_update.php | 7 +++++-- 7 files changed, 30 insertions(+), 16 deletions(-) diff --git a/adm/board_form.php b/adm/board_form.php index 1bf23223c..d40bd5756 100644 --- a/adm/board_form.php +++ b/adm/board_form.php @@ -1099,12 +1099,12 @@ $frm_submit .= ''; - - - - - - + + + + + + diff --git a/adm/sms_admin/history_send.php b/adm/sms_admin/history_send.php index 5f6b468b7..a28d981fe 100644 --- a/adm/sms_admin/history_send.php +++ b/adm/sms_admin/history_send.php @@ -67,7 +67,7 @@ if ($result) if ($result) //SMS 서버에 접속했습니다. { - sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', wr_reply='{$write['wr_reply']}', wr_message='{$write['wr_message']}', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'"); + sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', wr_reply='".addslashes($write['wr_reply'])."', wr_message='".addslashes($write['wr_message'])."', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'"); $wr_success = 0; $wr_failure = 0; diff --git a/adm/sms_admin/sms_write.php b/adm/sms_admin/sms_write.php index ee98ee8b4..89ec40562 100644 --- a/adm/sms_admin/sms_write.php +++ b/adm/sms_admin/sms_write.php @@ -238,6 +238,8 @@ function sms5_chk_send(f) var hp_list = document.getElementById('hp_list'); var wr_message = document.getElementById('wr_message'); var hp_number = document.getElementById('hp_number'); + var wr_reply = document.getElementById('wr_reply'); + var wr_reply_regExp = /^[0-9\-]+$/; var list = ''; if (!wr_message.value) { @@ -246,7 +248,12 @@ function sms5_chk_send(f) is_sms5_submitted = false; return false; } - + if( !wr_reply_regExp.test(wr_reply.value) ){ + alert('회신번호 형식이 잘못 되었습니다.'); + wr_reply.focus(); + is_sms5_submitted = false; + return false; + } if (hp_list.length < 1) { alert('받는 사람을 입력해주세요.'); hp_number.focus(); diff --git a/adm/sms_admin/sms_write_send.php b/adm/sms_admin/sms_write_send.php index c59301258..45646ffec 100644 --- a/adm/sms_admin/sms_write_send.php +++ b/adm/sms_admin/sms_write_send.php @@ -6,10 +6,13 @@ auth_check($auth[$sub_menu], "w"); $g5['title'] = "문자전송중"; -if (!trim($wr_reply)) - win_close_alert('회신 번호를 입력해주세요.'); +$wr_reply = preg_replace('#[^0-9\-]#', '', trim($wr_reply)); +$wr_message = clean_xss_tags(trim($wr_message)); -if (!trim($wr_message)) +if (!$wr_reply) + win_close_alert('회신 번호를 숫자, - 로 입력해주세요.'); + +if (!$wr_message) win_close_alert('메세지를 입력해주세요.'); if (!trim($send_list)) diff --git a/js/common.js b/js/common.js index 1707d757a..6b5349463 100644 --- a/js/common.js +++ b/js/common.js @@ -577,8 +577,8 @@ $(function(){ }); $("textarea#wr_content[maxlength]").live("keyup change", function() { - var str = $(this).val() - var mx = parseInt($(this).attr("maxlength")) + var str = $(this).val(); + var mx = parseInt($(this).attr("maxlength")); if (str.length > mx) { $(this).val(str.substr(0, mx)); return false; diff --git a/lib/common.lib.php b/lib/common.lib.php index 8b8b0a7a1..0a1e14889 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1448,7 +1448,8 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR) // Blind SQL Injection 취약점 해결 $sql = trim($sql); // union의 사용을 허락하지 않습니다. - $sql = preg_replace("#^select.*from.*union.*#i", "select 1", $sql); + //$sql = preg_replace("#^select.*from.*union.*#i", "select 1", $sql); + $sql = preg_replace("#^select.*from.*[\s\(]+union[\s\)]+.*#i ", "select 1", $sql); // `information_schema` DB로의 접근을 허락하지 않습니다. $sql = preg_replace("#^select.*from.*where.*`?information_schema`?.*#i", "select 1", $sql); diff --git a/plugin/sms5/write_update.php b/plugin/sms5/write_update.php index a25e50b7b..6db482697 100644 --- a/plugin/sms5/write_update.php +++ b/plugin/sms5/write_update.php @@ -15,10 +15,13 @@ if (!$is_member) if ($member['mb_level'] < $sms5['cf_level']) alert("회원 {$sms5['cf_level']}레벨 이상만 문자전송이 가능합니다."); -if (!trim($mh_reply)) +$mh_reply = preg_replace('#[^0-9\-]#', '', trim($mh_reply)); +$mh_message = clean_xss_tags(trim($mh_message)); + +if (!$mh_reply) alert('보내는 번호를 입력해주세요.'); -if (!trim($mh_message)) +if (!$mh_message) alert('메세지를 입력해주세요.'); if ($is_admin != 'super') From 2705b9312ccab75c7996755d624e4ae202e70355 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 13 May 2015 11:57:04 +0900 Subject: [PATCH 03/10] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C5.0.3?= =?UTF-8?q?3=20=EC=88=98=EC=A0=95=EB=82=B4=EC=97=AD=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/css/admin.css | 26 +++++++++++++------------- adm/member_list.php | 4 ++-- adm/menu_list.php | 6 +++++- adm/poll_form.php | 4 ++-- adm/poll_form_update.php | 5 ++--- adm/service.php | 17 +++++------------ bbs/login_check.php | 2 +- bbs/qatail.php | 2 +- config.php | 1 + js/autosave.js | 4 ++-- lib/common.lib.php | 4 ++-- 11 files changed, 36 insertions(+), 39 deletions(-) diff --git a/adm/css/admin.css b/adm/css/admin.css index 10b7cf592..036da508a 100644 --- a/adm/css/admin.css +++ b/adm/css/admin.css @@ -690,11 +690,11 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right} /*부가서비스*/ .lnb_svc{color:#ff3061;font-weight:bold} -.service_wrap{min-width:960px; margin:0 20px 10px;overflow:hidden} -.sevice_1{border:1px solid #ebe8e8;width:286px;float:left;border-radius:5px;text-align:center;margin-right:6px;} +.service_wrap{width:960px; margin:0 20px 10px;overflow:hidden} +.sevice_1{border:1px solid #ebe8e8;width:330px;float:left;border-radius:5px;text-align:center;margin-right:6px;} .sevice_1 .svc_img{padding:30px 0 0;} .sevice_1 h3{font-size:16px;margin:15px 0;color:#525252} -.sevice_1 p{padding:20px;background:#f8f8f8;height:102px;font-size:12px;text-align:left; color:#898989;line-height:18px} +.sevice_1 p{padding:20px;background:#f8f8f8;height:90px;font-size:12px;text-align:left; color:#898989;line-height:18px} .sevice_1 ul {width:100%;padding:0; margin:0;border-top:1px solid #ebe8e8;} .sevice_1 ul li{list-style:none;float:left;border-right:1px solid #ebe8e8;width:33%;} .sevice_1 ul li a{display:inline-block;height:76px;width:100%} @@ -703,14 +703,14 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right} .sevice_1 h4{width:100%;padding:0; margin:0;border-top:1px solid #ebe8e8;} .sevice_1 h4 a{display:inline-block;height:66px;padding:10px 0 0;width:100%} -.sevice_2{border:1px solid #ebe8e8;float:left;width:370px;} -.sevice_2 .svc_a{float:left;width:203px;padding:33px 0 0 22px ;height:111px; } -.sevice_2 .svc_a h3{font-size:14px;letter-spacing:-1px;color:#525252;margin-bottom:5px} -.sevice_2 .svc_a p{color:#898989;line-height:18px;letter-spacing:-1px;} -.sevice_2 .svc_btn{float:right;} -.sevice_2 .svc_btn a{display:inline-block; background:#ff3061;width:121px;text-align:center;color:#fff;padding:10px 0;margin:53px 10px 0 0;} +.sevice_2{border:1px solid #ebe8e8;float:left;width:282px;} +.sevice_2 .svc_a{padding:33px 0 0;} +.sevice_2 .svc_a h3{font-size:14px;letter-spacing:-1px;color:#525252;margin-bottom:5px;padding:0 20px 0} +.sevice_2 .svc_a p{color:#898989;line-height:18px;letter-spacing:-1px;padding:5px 20px 0;} +.sevice_2 .svc_btn{text-align:center;position:absolute;bottom:0;left:0;width:282px;} +.sevice_2 .svc_btn a{display:inline-block; background:#ff3061;text-align:center;color:#fff;padding:10px 20px;} .sevice_2 .svc_btn a:hover{text-decoration:none;} -.sevice_2 .svc_sms{overflow:hidden;border-bottom:1px solid #ebe8e8;} -.sevice_2 .svc_sms .svc_btn a{display:inline-block; width:132px; background:#f8f8f8;height:145px;text-align:center;margin:0;padding:0} -.sevice_2 .svc_sms .svc_btn a img{margin-top:50px;} -.sevice_2 .svc_keyword{overflow:hidden;border-bottom:1px solid #ebe8e8;background:#e6f2f4} +.sevice_2 .svc_sms{overflow:hidden;border-bottom:1px solid #ebe8e8; height:212px;position:relative} +.sevice_2 .svc_sms .svc_btn a{display:inline-block; background:#f8f8f8;width:100%;text-align:center;margin:0;padding:10px 0 0 } +.sevice_2 .svc_design{overflow:hidden;height:210px;position:relative} +.sevice_2 .svc_design .svc_btn a{margin:0 0 20px} diff --git a/adm/member_list.php b/adm/member_list.php index 5b94d03b5..71758af66 100644 --- a/adm/member_list.php +++ b/adm/member_list.php @@ -224,7 +224,7 @@ $colspan = 16; > - + " class="sound_only">접근차단 - + diff --git a/adm/menu_list.php b/adm/menu_list.php index bf6f75752..408a597f1 100644 --- a/adm/menu_list.php +++ b/adm/menu_list.php @@ -71,12 +71,16 @@ $colspan = 7; $sub_menu_info = ''.$row['me_name'].'의 서브'; $sub_menu_ico = ''; } + + $search = array('"', "'"); + $replace = array('"', '''); + $me_name = str_replace($search, $replace, $row['me_name']); ?> - + diff --git a/adm/poll_form.php b/adm/poll_form.php index 533596dcd..795719edf 100644 --- a/adm/poll_form.php +++ b/adm/poll_form.php @@ -86,8 +86,8 @@ include_once('./admin.head.php'); - - + 투표등록일 + diff --git a/adm/poll_form_update.php b/adm/poll_form_update.php index ef955f793..19a11b49d 100644 --- a/adm/poll_form_update.php +++ b/adm/poll_form_update.php @@ -14,7 +14,7 @@ if ($w == '') { $sql = " insert {$g5['poll_table']} ( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date ) - values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '".G5_TIME_YMDHIS."' ) "; + values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '".G5_TIME_YMD."' ) "; sql_query($sql); $po_id = mysql_insert_id(); @@ -43,8 +43,7 @@ else if ($w == 'u') po_cnt9 = '{$_POST['po_cnt9']}', po_etc = '{$_POST['po_etc']}', po_level = '{$_POST['po_level']}', - po_point = '{$_POST['po_point']}', - po_date = '{$_POST['po_date']}' + po_point = '{$_POST['po_point']}' where po_id = '{$_POST['po_id']}' "; sql_query($sql); } diff --git a/adm/service.php b/adm/service.php index 1e72e4732..4c6fd9d91 100644 --- a/adm/service.php +++ b/adm/service.php @@ -19,9 +19,9 @@ include_once('./admin.head.php');

정보통신망법 23조 2항(주민등록번호의 사용제한)에 따라 기존 주민등록번호 기반의 인증서비스 이용이 불가합니다. 주민등록번호 대체수단으로 최소한의 정보(생년월일, 휴대폰번호, 성별)를 입력받아 본인임을 확인하는 인증수단 입니다

    -
  • KCP 휴대폰 본인확인 신청하기
  • -
  • LG유플러스 휴대폰대체인증 신청하기
  • -
  • OKname 휴대폰 본인확인 신청하기
  • +
  • KCP 휴대폰 본인확인 신청하기
  • +
  • LG유플러스 휴대폰대체인증 신청하기
  • +
  • OKname 휴대폰 본인확인 신청하기
@@ -30,23 +30,16 @@ include_once('./admin.head.php');

정부가 주관하는 주민등록번호 대체 수단으로 본인의 개인정보를 아이핀 사이트에 한번만 발급해 놓고, 이후부터는 아이디와 패스워드 만으로 본인임을 확인하는 인증수단 입니다.

-

OKname 아이핀 본인확인 신청하기

+

OKname 아이핀 본인확인 신청하기

SMS 문자 서비스

-

사이트 관리자 또는 회원이 다른 회원의 휴대폰으로 단문메세지(최대 한글 40자, 영문 80자)를 발송할 수 있습니다.

+

사이트 관리자 또는 회원이 다른 회원의
휴대폰으로 단문메세지(최대 한글 40자, 영문 80자)를 발송할 수 있습니다.

아이코드 SMS 서비스 신청하기
-
-
-

키워드 검색광고 (네이버, 다음)

-

키워드 광고 최소 70원 부터!
키워드 광고의 전문가가 검색 결과의
최상단에 노출시켜 드립니다

-
- -

디자인 소스 (아사달)

diff --git a/bbs/login_check.php b/bbs/login_check.php index d5c1b0086..b83fc2f00 100644 --- a/bbs/login_check.php +++ b/bbs/login_check.php @@ -14,7 +14,7 @@ $mb = get_member($mb_id); // 가입된 회원이 아니다. 비밀번호가 틀리다. 라는 메세지를 따로 보여주지 않는 이유는 // 회원아이디를 입력해 보고 맞으면 또 비밀번호를 입력해보는 경우를 방지하기 위해서입니다. // 불법사용자의 경우 회원아이디가 틀린지, 비밀번호가 틀린지를 알기까지는 많은 시간이 소요되기 때문입니다. -if (!$mb['mb_id'] || (sql_password($mb_password) != $mb['mb_password'])) { +if (!$mb['mb_id'] || (sql_password($mb_password) !== $mb['mb_password'])) { alert('가입된 회원아이디가 아니거나 비밀번호가 틀립니다.\\n비밀번호는 대소문자를 구분합니다.'); } diff --git a/bbs/qatail.php b/bbs/qatail.php index b8b667307..4ab23b30d 100644 --- a/bbs/qatail.php +++ b/bbs/qatail.php @@ -6,7 +6,7 @@ if (G5_IS_MOBILE) { // 모바일의 경우 설정을 따르지 않는다. include_once('./_tail.php'); } else { - echo conv_content($qaconfig['qa_mobile_content_tail'], 1); + echo conv_content($qaconfig['qa_content_tail'], 1); if($qaconfig['qa_include_tail']) @include ($qaconfig['qa_include_tail']); else diff --git a/config.php b/config.php index edcd085b0..1256efa2e 100644 --- a/config.php +++ b/config.php @@ -5,6 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); +define('G5_GNUBOARD_VER', '5.0.33'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); diff --git a/js/autosave.js b/js/autosave.js index 201e0d5ce..c03fe0188 100644 --- a/js/autosave.js +++ b/js/autosave.js @@ -11,7 +11,7 @@ function autosave() { this.wr_content.value = CKEDITOR.instances.wr_content.getData(); } else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") { this.wr_content.value = ed_wr_content.outputBodyHTML(); - } else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors.getById['wr_content'])!="undefined" ) { + } else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors)!="undefined" && typeof(oEditors.getById['wr_content'])!="undefined" ) { this.wr_content.value = oEditors.getById['wr_content'].getIR(); } // 변수에 저장해 놓은 값과 다를 경우에만 임시 저장함 @@ -82,7 +82,7 @@ $(function(){ CKEDITOR.instances.wr_content.setData(content); } else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") { ed_wr_content.putContents(content); - } else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors.getById['wr_content'])!="undefined" ) { + } else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors)!="undefined" && typeof(oEditors.getById['wr_content'])!="undefined" ) { oEditors.getById["wr_content"].exec("SET_CONTENTS", [""]); //oEditors.getById["wr_content"].exec("SET_IR", [""]); oEditors.getById["wr_content"].exec("PASTE_HTML", [content]); diff --git a/lib/common.lib.php b/lib/common.lib.php index 0a1e14889..37e0c4704 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2430,12 +2430,12 @@ function googl_short_url($longUrl) // URL Shortener API ON $apiKey = $config['cf_googl_shorturl_apikey']; - $postData = array('longUrl' => $longUrl, 'key' => $apiKey); + $postData = array('longUrl' => $longUrl); $jsonData = json_encode($postData); $curlObj = curl_init(); - curl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url'); + curl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url?key='.$apiKey); curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curlObj, CURLOPT_HEADER, 0); From 01a31bb18f16b7b4dd9311365225042f26a20824 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 13 May 2015 17:10:08 +0900 Subject: [PATCH 04/10] =?UTF-8?q?Magic=20Hash=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20=EC=B2=B4=ED=81=AC=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/member_form_update.php | 4 ++-- adm/visit_delete_update.php | 2 +- bbs/delete.php | 2 +- bbs/delete_all.php | 2 +- bbs/delete_comment.php | 2 +- bbs/login_check.php | 2 +- bbs/member_leave.php | 2 +- bbs/password_check.php | 4 ++-- bbs/password_lost2.php | 2 +- bbs/register_form.php | 2 +- bbs/register_form_update.php | 4 ++-- bbs/write.php | 2 +- bbs/write_comment_update.php | 2 +- bbs/write_update.php | 4 ++-- config.php | 4 ++++ lib/common.lib.php | 20 ++++++++++++++++++++ 16 files changed, 42 insertions(+), 18 deletions(-) diff --git a/adm/member_form_update.php b/adm/member_form_update.php index 53174cd3b..333b18728 100644 --- a/adm/member_form_update.php +++ b/adm/member_form_update.php @@ -81,7 +81,7 @@ if ($w == '') if ($row['mb_id']) alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']); - sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".sql_password($mb_password)."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '".G5_TIME_YMDHIS."', {$sql_common} "); + sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".get_encrypt_string($mb_password)."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '".G5_TIME_YMDHIS."', {$sql_common} "); } else if ($w == 'u') { @@ -139,7 +139,7 @@ else if ($w == 'u') } if ($mb_password) - $sql_password = " , mb_password = '".sql_password($mb_password)."' "; + $sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' "; else $sql_password = ""; diff --git a/adm/visit_delete_update.php b/adm/visit_delete_update.php index 1cbe920cf..716eec63f 100644 --- a/adm/visit_delete_update.php +++ b/adm/visit_delete_update.php @@ -19,7 +19,7 @@ if(!$pass) // 관리자 비밀번호 비교 $admin = get_admin('super'); -if(sql_password($pass) != $admin['mb_password']) +if(!check_password($pass, $admin['mb_password'])) alert('관리자 비밀번호가 일치하지 않습니다.'); if(!$year) diff --git a/bbs/delete.php b/bbs/delete.php index 570c12b19..3e75649cb 100644 --- a/bbs/delete.php +++ b/bbs/delete.php @@ -31,7 +31,7 @@ else if ($is_admin == 'group') { // 그룹관리자 } else { if ($write['mb_id']) alert('로그인 후 삭제하세요.', './login.php?url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id)); - else if (sql_password($wr_password) != $write['wr_password']) + else if (!check_password($wr_password, $write['wr_password'])) alert('비밀번호가 틀리므로 삭제할 수 없습니다.'); } diff --git a/bbs/delete_all.php b/bbs/delete_all.php index 023d034fa..1d0ca652e 100644 --- a/bbs/delete_all.php +++ b/bbs/delete_all.php @@ -53,7 +53,7 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) { ; } - else if ($wr_password && !$write['mb_id'] && sql_password($wr_password) == $write['wr_password']) // 비밀번호가 같다면 + else if ($wr_password && !$write['mb_id'] && check_password($wr_password, $write['wr_password'])) // 비밀번호가 같다면 { ; } diff --git a/bbs/delete_comment.php b/bbs/delete_comment.php index 7055c0955..812c6f516 100644 --- a/bbs/delete_comment.php +++ b/bbs/delete_comment.php @@ -40,7 +40,7 @@ else if ($is_admin == 'group') { // 그룹관리자 if ($member['mb_id'] != $write['mb_id']) alert('자신의 글이 아니므로 삭제할 수 없습니다.'); } else { - if (sql_password($wr_password) != $write['wr_password']) + if (!check_password($wr_password, $write['wr_password'])) alert('비밀번호가 틀립니다.'); } diff --git a/bbs/login_check.php b/bbs/login_check.php index b83fc2f00..54e4f1247 100644 --- a/bbs/login_check.php +++ b/bbs/login_check.php @@ -14,7 +14,7 @@ $mb = get_member($mb_id); // 가입된 회원이 아니다. 비밀번호가 틀리다. 라는 메세지를 따로 보여주지 않는 이유는 // 회원아이디를 입력해 보고 맞으면 또 비밀번호를 입력해보는 경우를 방지하기 위해서입니다. // 불법사용자의 경우 회원아이디가 틀린지, 비밀번호가 틀린지를 알기까지는 많은 시간이 소요되기 때문입니다. -if (!$mb['mb_id'] || (sql_password($mb_password) !== $mb['mb_password'])) { +if (!$mb['mb_id'] || !check_password($mb_password, $mb['mb_password'])) { alert('가입된 회원아이디가 아니거나 비밀번호가 틀립니다.\\n비밀번호는 대소문자를 구분합니다.'); } diff --git a/bbs/member_leave.php b/bbs/member_leave.php index c880d0284..c58910b84 100644 --- a/bbs/member_leave.php +++ b/bbs/member_leave.php @@ -7,7 +7,7 @@ if (!$member['mb_id']) if ($is_admin == 'super') alert('최고 관리자는 탈퇴할 수 없습니다'); -if (!($_POST['mb_password'] && $member['mb_password'] == sql_password($_POST['mb_password']))) +if (!($_POST['mb_password'] && check_password($_POST['mb_password'], $member['mb_password']))) alert('비밀번호가 틀립니다.'); // 회원탈퇴일을 저장 diff --git a/bbs/password_check.php b/bbs/password_check.php index 4f2f63e9b..086508911 100644 --- a/bbs/password_check.php +++ b/bbs/password_check.php @@ -6,7 +6,7 @@ if ($w == 's') { $wr = get_write($write_table, $wr_id); - if (sql_password($wr_password) != $wr['wr_password']) + if (!check_password($wr_password, $wr['wr_password'])) alert('비밀번호가 틀립니다.'); // 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임. @@ -20,7 +20,7 @@ if ($w == 's') { $wr = get_write($write_table, $wr_id); - if (sql_password($wr_password) != $wr['wr_password']) + if (!check_password($wr_password, $wr['wr_password'])) alert('비밀번호가 틀립니다.'); // 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임. diff --git a/bbs/password_lost2.php b/bbs/password_lost2.php index 2b7a43a80..6c20c0a03 100644 --- a/bbs/password_lost2.php +++ b/bbs/password_lost2.php @@ -30,7 +30,7 @@ else if (is_admin($mb['mb_id'])) // 임시비밀번호 발급 $change_password = rand(100000, 999999); -$mb_lost_certify = sql_password($change_password); +$mb_lost_certify = get_encrypt_string($change_password); // 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용 $mb_nonce = md5(pack('V*', rand(), rand(), rand(), rand())); diff --git a/bbs/register_form.php b/bbs/register_form.php index 809bcb6ed..cb6fd2517 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -69,7 +69,7 @@ if ($w == "") { if ($_POST['is_update']) $tmp_password = $_POST['mb_password']; else - $tmp_password = sql_password($_POST['mb_password']); + $tmp_password = get_encrypt_string($_POST['mb_password']); if ($member['mb_password'] != $tmp_password) alert('비밀번호가 틀립니다.'); diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index b61081c4e..24e4987bc 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -181,7 +181,7 @@ if ($config['cf_cert_use'] && $cert_type && $md5_cert_no) { if ($w == '') { $sql = " insert into {$g5['member_table']} set mb_id = '{$mb_id}', - mb_password = '".sql_password($mb_password)."', + mb_password = '".get_encrypt_string($mb_password)."', mb_name = '{$mb_name}', mb_nick = '{$mb_nick}', mb_nick_date = '".G5_TIME_YMD."', @@ -276,7 +276,7 @@ if ($w == '') { $sql_password = ""; if ($mb_password) - $sql_password = " , mb_password = '".sql_password($mb_password)."' "; + $sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' "; $sql_nick_date = ""; if ($mb_nick_default != $mb_nick) diff --git a/bbs/write.php b/bbs/write.php index 03f8b3aae..6f4149aad 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -309,7 +309,7 @@ if ($w == '') { if (!$is_admin) { if (!($is_member && $member['mb_id'] == $write['mb_id'])) { - if (sql_password($wr_password) != $write['wr_password']) { + if (!check_password($wr_password, $write['wr_password'])) { alert('비밀번호가 틀립니다.'); } } diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php index ceb54a5ee..c2fdb67e7 100644 --- a/bbs/write_comment_update.php +++ b/bbs/write_comment_update.php @@ -60,7 +60,7 @@ if ($is_member) else { $mb_id = ''; - $wr_password = sql_password($wr_password); + $wr_password = get_encrypt_string($wr_password); } if ($w == 'c') // 댓글 입력 diff --git a/bbs/write_update.php b/bbs/write_update.php index fcc33c999..e70f57e6c 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -191,7 +191,7 @@ if ($w == '' || $w == 'r') { $wr_name = clean_xss_tags(trim($_POST['wr_name'])); if (!$wr_name) alert('이름은 필히 입력하셔야 합니다.'); - $wr_password = sql_password($wr_password); + $wr_password = get_encrypt_string($wr_password); $wr_email = get_email_address(trim($_POST['wr_email'])); $wr_homepage = clean_xss_tags($wr_homepage); } @@ -327,7 +327,7 @@ if ($w == '' || $w == 'r') { $wr_email = get_email_address(trim($_POST['wr_email'])); } - $sql_password = $wr_password ? " , wr_password = '".sql_password($wr_password)."' " : ""; + $sql_password = $wr_password ? " , wr_password = '".get_encrypt_string($wr_password)."' " : ""; $sql_ip = ''; if (!$is_admin) diff --git a/config.php b/config.php index 1256efa2e..5ef1cc104 100644 --- a/config.php +++ b/config.php @@ -165,6 +165,10 @@ define('G5_SMTP', '127.0.0.1'); 기타 상수 ********************/ +// 암호화 함수 지정 +// 사인트 운영 중 설정을 변경하면 로그인이 안되는 등의 문제가 발생합니다. +define('G5_STRING_ENCRYPT_FUNCTION', 'sql_password'); + // SQL 에러를 표시할 것인지 지정 // 에러를 표시하려면 TRUE 로 변경 define('G5_DISPLAY_SQL_ERROR', FALSE); diff --git a/lib/common.lib.php b/lib/common.lib.php index 37e0c4704..483b50ba5 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2824,4 +2824,24 @@ function insert_popular($field, $str) sql_query($sql, FALSE); } } + +// 문자열 암호화 +function get_encrypt_string($str) +{ + if(defined('G5_STRING_ENCRYPT_FUNCTION') && G5_STRING_ENCRYPT_FUNCTION) { + $encrypt = call_user_func(G5_STRING_ENCRYPT_FUNCTION, $str); + } else { + $encrypt = sql_password($str); + } + + return $encrypt; +} + +// 비밀번호 비교 +function check_password($pass, $hash) +{ + $password = get_encrypt_string($pass); + + return ($password === $hash); +} ?> \ No newline at end of file From 18fc8ec6d15d7d184d138e03581b905d453dbdef Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 14 May 2015 09:14:37 +0900 Subject: [PATCH 05/10] =?UTF-8?q?=EC=98=A4=ED=83=80=20=EB=B0=8F=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=ED=8F=BC=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/register_form_update.php | 2 +- config.php | 2 +- skin/member/basic/style.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php index 24e4987bc..05e90788c 100644 --- a/bbs/register_form_update.php +++ b/bbs/register_form_update.php @@ -419,7 +419,7 @@ if ($w == '') { 회원정보수정 - + diff --git a/config.php b/config.php index 5ef1cc104..c068fe974 100644 --- a/config.php +++ b/config.php @@ -166,7 +166,7 @@ define('G5_SMTP', '127.0.0.1'); ********************/ // 암호화 함수 지정 -// 사인트 운영 중 설정을 변경하면 로그인이 안되는 등의 문제가 발생합니다. +// 사이트 운영 중 설정을 변경하면 로그인이 안되는 등의 문제가 발생합니다. define('G5_STRING_ENCRYPT_FUNCTION', 'sql_password'); // SQL 에러를 표시할 것인지 지정 diff --git a/skin/member/basic/style.css b/skin/member/basic/style.css index 87861cf15..481d30037 100644 --- a/skin/member/basic/style.css +++ b/skin/member/basic/style.css @@ -50,7 +50,7 @@ .mbskin .frm_file {} .mbskin .tbl_frm01 {} -.mbskin .tbl_frm01 th {} +.mbskin .tbl_frm01 th {width:85px;} .mbskin .tbl_frm01 td {} .mbskin .tbl_frm01 textarea, .mb_skin tbl_frm01 .frm_input {} .mbskin .tbl_frm01 textarea {} From 330e656544fd3cd209178a79131995d35858e72d Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 19 May 2015 13:59:00 +0900 Subject: [PATCH 06/10] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C5.0.3?= =?UTF-8?q?4=20=EC=88=98=EC=A0=95=EB=82=B4=EC=97=AD=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/boardgroupmember_form.php | 1 - adm/boardgroupmember_list.php | 2 -- adm/mail_list.php | 1 - adm/member_list.php | 2 -- adm/poll_list.php | 1 - adm/visit_list.php | 4 ++-- adm/visit_search.php | 4 ++-- bbs/alert.php | 3 +++ bbs/confirm.php | 5 +++++ bbs/login.php | 8 ++------ bbs/login_check.php | 3 +++ bbs/visit_insert.inc.php | 2 +- lib/common.lib.php | 22 ++++++++++++++++++++++ 13 files changed, 40 insertions(+), 18 deletions(-) diff --git a/adm/boardgroupmember_form.php b/adm/boardgroupmember_form.php index 70d014c82..74737330e 100644 --- a/adm/boardgroupmember_form.php +++ b/adm/boardgroupmember_form.php @@ -76,7 +76,6 @@ $colspan = 4; $sql .= " order by a.gr_id desc "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { - $s_del = '삭제'; ?> diff --git a/adm/boardgroupmember_list.php b/adm/boardgroupmember_list.php index e6eaf01fe..9692b976c 100644 --- a/adm/boardgroupmember_list.php +++ b/adm/boardgroupmember_list.php @@ -104,8 +104,6 @@ $colspan = 7; if ($row2['cnt']) $group = ''.$row2['cnt'].''; - //$s_del = '삭제'; - $mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']); $bg = 'bg'.($i%2); diff --git a/adm/mail_list.php b/adm/mail_list.php index 727f4cf9c..6dfbd44ef 100644 --- a/adm/mail_list.php +++ b/adm/mail_list.php @@ -52,7 +52,6 @@ $colspan = 7; 삭제'; $s_vie = '미리보기'; $num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i); diff --git a/adm/member_list.php b/adm/member_list.php index 71758af66..3b773a5f7 100644 --- a/adm/member_list.php +++ b/adm/member_list.php @@ -158,10 +158,8 @@ $colspan = 16; if ($is_admin == 'group') { $s_mod = ''; - $s_del = ''; } else { $s_mod = '수정'; - //$s_del = '삭제'; } $s_grp = '그룹'; diff --git a/adm/poll_list.php b/adm/poll_list.php index b07e39166..0408f00ad 100644 --- a/adm/poll_list.php +++ b/adm/poll_list.php @@ -106,7 +106,6 @@ $colspan = 7; $po_etc = ($row['po_etc']) ? "사용" : "미사용"; $s_mod = '수정'; - //$s_del = '삭제'; $bg = 'bg'.($i%2); ?> diff --git a/adm/visit_list.php b/adm/visit_list.php index 3b9b9c070..f4934488a 100644 --- a/adm/visit_list.php +++ b/adm/visit_list.php @@ -75,8 +75,8 @@ $result = sql_query($sql); else $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['vi_ip']); - if ($brow == '기타') { $brow = ''.$brow.''; } - if ($os == '기타') { $os = ''.$os.''; } + if ($brow == '기타') { $brow = ''.$brow.''; } + if ($os == '기타') { $os = ''.$os.''; } $bg = 'bg'.($i%2); ?> diff --git a/adm/visit_search.php b/adm/visit_search.php index 636304de2..fb52d05f2 100644 --- a/adm/visit_search.php +++ b/adm/visit_search.php @@ -92,8 +92,8 @@ $listall = '처음'; //페이지 처음 else $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['vi_ip']); - if ($brow == '기타') $brow = ''.$brow.''; - if ($os == '기타') $os = ''.$os.''; + if ($brow == '기타') $brow = ''.$brow.''; + if ($os == '기타') $os = ''.$os.''; $bg = 'bg'.($i%2); ?> diff --git a/bbs/alert.php b/bbs/alert.php index c56f8d735..d64b6f2fd 100644 --- a/bbs/alert.php +++ b/bbs/alert.php @@ -32,6 +32,9 @@ $msg2 = str_replace("\\n", "
", $msg); if (!$url) $url = $_SERVER['HTTP_REFERER']; +// url 체크 +check_url_host($url); + if($error) { $header2 = "다음 항목에 오류가 있습니다."; } else { diff --git a/bbs/confirm.php b/bbs/confirm.php index cba013226..76e9c7652 100644 --- a/bbs/confirm.php +++ b/bbs/confirm.php @@ -1,6 +1,11 @@ '.PHP_EOL; + echo ''.PHP_EOL; + exit; + } + } +} ?> \ No newline at end of file From 7110ccc12ff36f844c3d399bc035725b4babb168 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 1 Jun 2015 09:38:12 +0900 Subject: [PATCH 07/10] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C=205.?= =?UTF-8?q?0.35=20=EC=88=98=EC=A0=95=EB=82=B4=EC=97=AD=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 8 +-- adm/css/admin.css | 2 +- adm/service.php | 9 +-- config.php | 6 +- js/common.js | 137 ++++++++++++++++++++++++++++++++++++++------ lib/common.lib.php | 5 +- 6 files changed, 131 insertions(+), 36 deletions(-) diff --git a/adm/config_form.php b/adm/config_form.php index a7401dc2c..cb295b9f6 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -816,8 +816,8 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) { 서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.
이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.
아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,
휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?> - KCB 아이핀 서비스 신청페이지 - KCB 휴대폰 본인확인 서비스 신청페이지 + KCB 아이핀 서비스 신청페이지 + KCB 휴대폰 본인확인 서비스 신청페이지 @@ -825,7 +825,7 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) { 서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?> SM - KCP 휴대폰 본인확인 서비스 신청페이지 + KCP 휴대폰 본인확인 서비스 신청페이지 @@ -833,7 +833,7 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) { 서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 상점아이디를 발급 받으실 수 있습니다.
LG유플러스 휴대폰본인확인은 ActiveX 설치가 필요하므로 Internet Explorer 에서만 사용할 수 있습니다.') ?> si_ - LG유플러스 본인확인 서비스 신청페이지 + LG유플러스 본인확인 서비스 신청페이지 diff --git a/adm/css/admin.css b/adm/css/admin.css index 036da508a..e77a3052a 100644 --- a/adm/css/admin.css +++ b/adm/css/admin.css @@ -710,7 +710,7 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right} .sevice_2 .svc_btn{text-align:center;position:absolute;bottom:0;left:0;width:282px;} .sevice_2 .svc_btn a{display:inline-block; background:#ff3061;text-align:center;color:#fff;padding:10px 20px;} .sevice_2 .svc_btn a:hover{text-decoration:none;} -.sevice_2 .svc_sms{overflow:hidden;border-bottom:1px solid #ebe8e8; height:212px;position:relative} +.sevice_2 .svc_sms{overflow:hidden; height:212px;position:relative} .sevice_2 .svc_sms .svc_btn a{display:inline-block; background:#f8f8f8;width:100%;text-align:center;margin:0;padding:10px 0 0 } .sevice_2 .svc_design{overflow:hidden;height:210px;position:relative} .sevice_2 .svc_design .svc_btn a{margin:0 0 20px} diff --git a/adm/service.php b/adm/service.php index 4c6fd9d91..0acfb3b2a 100644 --- a/adm/service.php +++ b/adm/service.php @@ -40,14 +40,7 @@ include_once('./admin.head.php');
아이코드 SMS 서비스 신청하기
-
-
-

디자인 소스 (아사달)

-

이곳을 통하여 아사달 디자인 소스, 시안, 사진 등 구입하시면 10% 할인 쿠폰을 매일 선착순 15분께 드립니다.

-
- -
- +
diff --git a/config.php b/config.php index c068fe974..eb5140099 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.0.33'); +define('G5_GNUBOARD_VER', '5.0.35'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); @@ -200,8 +200,8 @@ define('G5_THUMB_PNG_COMPRESS', 5); define('G5_IP_DISPLAY', '\\1.♡.\\3.\\4'); if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') { //https 통신일때 daum 주소 js - define('G5_POSTCODE_JS', ''); + define('G5_POSTCODE_JS', ''); } else { //http 통신일때 daum 주소 js - define('G5_POSTCODE_JS', ''); + define('G5_POSTCODE_JS', ''); } ?> \ No newline at end of file diff --git a/js/common.js b/js/common.js index 6b5349463..8802f1c09 100644 --- a/js/common.js +++ b/js/common.js @@ -378,31 +378,130 @@ var win_homepage = function(href) { **/ var win_zip = function(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) { if(typeof daum === 'undefined'){ - alert("다음 juso.js 파일이 로드되지 않았습니다."); + alert("다음 우편번호 postcode.v2.js 파일이 로드되지 않았습니다."); return false; } - new daum.Postcode({ - oncomplete: function(data) { - // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분. - // 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다. - var of = document[frm_name]; - of[frm_zip1].value = data.postcode1; - of[frm_zip2].value = data.postcode2; - of[frm_addr1].value = data.address1; - of[frm_addr2].value = ""; - of[frm_addr3].value = ""; + var zip_case = 1; //0이면 레이어, 1이면 페이지에 끼워 넣기, 2이면 새창 - if( data.addressType == "R" ){ //도로명이면 - of[frm_addr3].value = data.address2; - } - if(of[frm_jibeon] !== undefined){ - of[frm_jibeon].value = data.addressType; - } + var complete_fn = function(data){ + // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분. + + // 각 주소의 노출 규칙에 따라 주소를 조합한다. + // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다. + var fullAddr = ''; // 최종 주소 변수 + var extraAddr = ''; // 조합형 주소 변수 - of[frm_addr2].focus(); + // 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다. + if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우 + fullAddr = data.roadAddress; + + } else { // 사용자가 지번 주소를 선택했을 경우(J) + fullAddr = data.jibunAddress; } - }).open(); + + // 사용자가 선택한 주소가 도로명 타입일때 조합한다. + if(data.userSelectedType === 'R'){ + //법정동명이 있을 경우 추가한다. + if(data.bname !== ''){ + extraAddr += data.bname; + } + // 건물명이 있을 경우 추가한다. + if(data.buildingName !== ''){ + extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); + } + // 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다. + extraAddr = (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); + } + + // 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다. + var of = document[frm_name]; + + of[frm_zip1].value = data.postcode1; + of[frm_zip2].value = data.postcode2; + + of[frm_addr1].value = fullAddr; + of[frm_addr3].value = extraAddr; + + if(of[frm_jibeon] !== undefined){ + of[frm_jibeon].value = data.userSelectedType; + } + + of[frm_addr2].focus(); + }; + + switch(zip_case) { + case 1 : //iframe을 이용하여 페이지에 끼워 넣기 + var daum_pape_id = 'daum_juso_page'+frm_zip1, + element_wrap = document.getElementById(daum_pape_id), + currentScroll = Math.max(document.body.scrollTop, document.documentElement.scrollTop); + if (element_wrap == null) { + element_wrap = document.createElement("div"); + element_wrap.setAttribute("id", daum_pape_id); + element_wrap.style.cssText = 'display:none;border:1px solid;left:0;width:100%;height:300px;margin:5px 0;position:relative;-webkit-overflow-scrolling:touch;'; + element_wrap.innerHTML = '접기 버튼'; + jQuery('form[name="'+frm_name+'"]').find('input[name="'+frm_addr1+'"]').before(element_wrap); + jQuery("#"+daum_pape_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){ + e.preventDefault(); + jQuery(this).parent().hide(); + }); + } + + new daum.Postcode({ + oncomplete: function(data) { + complete_fn(data); + // iframe을 넣은 element를 안보이게 한다. + element_wrap.style.display = 'none'; + // 우편번호 찾기 화면이 보이기 이전으로 scroll 위치를 되돌린다. + document.body.scrollTop = currentScroll; + }, + // 우편번호 찾기 화면 크기가 조정되었을때 실행할 코드를 작성하는 부분. + // iframe을 넣은 element의 높이값을 조정한다. + onresize : function(size) { + element_wrap.style.height = size.height + "px"; + }, + width : '100%', + height : '100%' + }).embed(element_wrap); + + // iframe을 넣은 element를 보이게 한다. + element_wrap.style.display = 'block'; + break; + case 2 : //새창으로 띄우기 + new daum.Postcode({ + oncomplete: function(data) { + complete_fn(data); + } + }).open(); + break; + default : //iframe을 이용하여 레이어 띄우기 + var rayer_id = 'daum_juso_rayer'+frm_zip1, + element_layer = document.getElementById(rayer_id); + if (element_layer == null) { + element_layer = document.createElement("div"); + element_layer.setAttribute("id", rayer_id); + element_layer.style.cssText = 'display:none;border:5px solid;position:fixed;width:300px;height:460px;left:50%;margin-left:-155px;top:50%;margin-top:-235px;overflow:hidden;-webkit-overflow-scrolling:touch;z-index:10000'; + element_layer.innerHTML = '닫기 버튼'; + document.body.appendChild(element_layer); + jQuery("#"+rayer_id).off("click", ".close_daum_juso").on("click", ".close_daum_juso", function(e){ + e.preventDefault(); + jQuery(this).parent().hide(); + }); + } + + new daum.Postcode({ + oncomplete: function(data) { + complete_fn(data); + // iframe을 넣은 element를 안보이게 한다. + element_layer.style.display = 'none'; + }, + width : '100%', + height : '100%' + }).embed(element_layer); + + // iframe을 넣은 element를 보이게 한다. + element_layer.style.display = 'block'; + } } /** diff --git a/lib/common.lib.php b/lib/common.lib.php index e652637cb..cf28863a3 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2852,8 +2852,11 @@ function check_url_host($url, $msg='', $return_url=G5_URL) $msg = 'url에 타 도메인을 지정할 수 없습니다.'; $p = parse_url($url); + $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); + if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) { - if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) { + //if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) { + if ($p['host'] != $host) { echo ' - + - class="local_sch01 local_sch" method="get"> + class="local_sch01 local_sch" method="get"> @@ -91,7 +91,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); - + - + @@ -100,7 +100,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php'); - + - + @@ -244,7 +244,7 @@ function all_send() - + - + 거부 명 -
+ + diff --git a/adm/visit_list.php b/adm/visit_list.php index f4934488a..afc950164 100644 --- a/adm/visit_list.php +++ b/adm/visit_list.php @@ -102,7 +102,7 @@ if (isset($domain)) $qstr .= "&domain=$domain"; $qstr .= "&page="; -$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr"); +$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr"); echo $pagelist; include_once('./admin.tail.php'); diff --git a/adm/visit_search.php b/adm/visit_search.php index fb52d05f2..23f1af471 100644 --- a/adm/visit_search.php +++ b/adm/visit_search.php @@ -10,7 +10,7 @@ include_once('./admin.head.php'); include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); $colspan = 5; -$listall = '처음'; //페이지 처음으로 (초기화용도) +$listall = '처음'; //페이지 처음으로 (초기화용도) ?>
@@ -98,11 +98,11 @@ $listall = '처음'; //페이지 처음 $bg = 'bg'.($i%2); ?> - + - + 자료가 없습니다.'; ?> @@ -111,7 +111,7 @@ $listall = '처음'; //페이지 처음
alert(\'회원만 접근 가능합니다.\'); top.location.href = \''.$href.'\'; '; + echo ''; exit; } @@ -32,6 +32,8 @@ if ($row['cnt']) exit; } +$wr_content = trim($_POST['wr_content']); + // 덧글이 넘어오고 코멘트를 쓸 권한이 있다면 if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level'])) { diff --git a/bbs/search.php b/bbs/search.php index ed0058d54..9548bfae7 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -135,7 +135,7 @@ if ($stx) { $sch_all = ""; if ($onetable == $g5_search['tables'][$i]) $sch_class = "class=sch_on"; else $sch_all = "class=sch_on"; - $str_board_list .= '
  • '.$row2['bo_subject'].''.$row['cnt'].'
  • '; + $str_board_list .= '
  • '.$row2['bo_subject'].''.$row['cnt'].'
  • '; } } @@ -217,7 +217,7 @@ if ($stx) { $from_record = 0; } - $write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$search_query.'&gr_id='.$gr_id.'&srows='.$srows.'&onetable='.$onetable.'&page='); + $write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME'].'?'.$search_query.'&gr_id='.$gr_id.'&srows='.$srows.'&onetable='.$onetable.'&page='); } $group_select = '