From 3a311906bfcd84d021869403b206fb73eed3062f Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 16 Aug 2017 09:24:15 +0900 Subject: [PATCH 1/4] =?UTF-8?q?1:1=20=EB=AC=B8=EC=9D=98=20=EB=B0=8F=20?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=EA=B4=80=EB=A6=AC=20=EC=83=81=EB=8B=A8=20?= =?UTF-8?q?=ED=95=98=EB=8B=A8=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/content.php | 4 ++-- bbs/qahead.php | 2 +- bbs/qatail.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bbs/content.php b/bbs/content.php index 8aa2f36af..b46d6f338 100644 --- a/bbs/content.php +++ b/bbs/content.php @@ -19,7 +19,7 @@ if (!$co['co_id']) $g5['title'] = $co['co_subject']; -if (is_include_path_check($co['co_include_head'])) +if ($co['co_include_head'] && is_include_path_check($co['co_include_head'])) @include_once($co['co_include_head']); else include_once('./_head.php'); @@ -85,7 +85,7 @@ if(is_file($skin_file)) { echo '

'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.

'; } -if (is_include_path_check($co['co_include_tail'])) +if ($co['co_include_tail'] && is_include_path_check($co['co_include_tail'])) @include_once($co['co_include_tail']); else include_once('./_tail.php'); diff --git a/bbs/qahead.php b/bbs/qahead.php index d4aaa4d6e..976f4d524 100644 --- a/bbs/qahead.php +++ b/bbs/qahead.php @@ -9,7 +9,7 @@ if (G5_IS_MOBILE) { include_once('./_head.php'); echo conv_content($qaconfig['qa_mobile_content_head'], 1); } else { - if(is_include_path_check($qaconfig['qa_include_head'])) + if($qaconfig['qa_include_head'] && is_include_path_check($qaconfig['qa_include_head'])) @include ($qaconfig['qa_include_head']); else include ('./_head.php'); diff --git a/bbs/qatail.php b/bbs/qatail.php index 8cc00e1a3..8b22bcf66 100644 --- a/bbs/qatail.php +++ b/bbs/qatail.php @@ -7,7 +7,7 @@ if (G5_IS_MOBILE) { include_once('./_tail.php'); } else { echo conv_content($qaconfig['qa_content_tail'], 1); - if(is_include_path_check($qaconfig['qa_include_tail'])) + if($qaconfig['qa_include_tail'] && is_include_path_check($qaconfig['qa_include_tail'])) @include ($qaconfig['qa_include_tail']); else include ('./_tail.php'); From cf680e43d81cca5c3da6732f9967c7d2eeaf06f4 Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 16 Aug 2017 09:30:52 +0900 Subject: [PATCH 2/4] =?UTF-8?q?5.2.9.2=20=EB=B2=84=EC=A0=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php b/config.php index 6073b0a83..155c2a968 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.2.9'); +define('G5_GNUBOARD_VER', '5.2.9.2'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); From 91f60763d885ce581fec99b8abc6890dd78b2ea6 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 21 Aug 2017 19:38:14 +0900 Subject: [PATCH 3/4] =?UTF-8?q?IOS=2010.3.x=20=EB=B2=84=EC=A0=84=EB=8C=80?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=8B=A4=EC=9D=8C=20=EC=9A=B0=ED=8E=B8?= =?UTF-8?q?=EC=A3=BC=EC=86=8C=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/common.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/common.js b/js/common.js index e63c0f0eb..83f42221d 100644 --- a/js/common.js +++ b/js/common.js @@ -459,6 +459,7 @@ var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_j onresize : function(size) { element_wrap.style.height = size.height + "px"; }, + maxSuggestItems : g5_is_mobile ? 6 : 10, width : '100%', height : '100%' }).embed(element_wrap); @@ -494,6 +495,7 @@ var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_j // iframe을 넣은 element를 안보이게 한다. element_layer.style.display = 'none'; }, + maxSuggestItems : g5_is_mobile ? 6 : 10, width : '100%', height : '100%' }).embed(element_layer); From 3d2d3b99483e3f5a46a82a1dc86ea3c4b117b1ad Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 22 Aug 2017 16:46:36 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=EC=98=A4=ED=94=88=20=EB=A6=AC=EB=8B=A4?= =?UTF-8?q?=EC=9D=B4=EB=A0=89=ED=8A=B8=20=EC=9C=A0=EC=A0=80=20=ED=8C=A8?= =?UTF-8?q?=EC=8A=A4=EC=9B=8C=EB=93=9C=20Leak=20=EC=B7=A8=EC=95=BD?= =?UTF-8?q?=EC=A0=90=20=EC=88=98=EC=A0=95=20adm1nkyj@UpRoot=EB=8B=98?= =?UTF-8?q?=EC=9D=B4=20=EC=95=8C=EB=A0=A4=EC=A3=BC=EC=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 2062c4d05..72801dc7f 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2988,15 +2988,32 @@ function check_url_host($url, $msg='', $return_url=G5_URL) $p = @parse_url($url); $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); + $is_host_check = false; if(stripos($url, 'http:') !== false) { if(!isset($p['scheme']) || !$p['scheme'] || !isset($p['host']) || !$p['host']) alert('url 정보가 올바르지 않습니다.', $return_url); } - if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) { + //php 5.6.29 이하 버전에서는 parse_url 버그가 존재함 + if ( (isset($p['host']) && $p['host']) && version_compare(PHP_VERSION, '5.6.29') < 0) { + $bool_ch = false; + foreach( array('user','host') as $key) { + if ( isset( $p[ $key ] ) && strpbrk( $p[ $key ], ':/?#@' ) ) { + $bool_ch = true; + } + } + if( $bool_ch ){ + $regex = '/https?\:\/\/'.$host.'/i'; + if( ! preg_match($regex, $url) ){ + $is_host_check = true; + } + } + } + + if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host']) || $is_host_check) { //if ($p['host'].(isset($p['port']) ? ':'.$p['port'] : '') != $_SERVER['HTTP_HOST']) { - if ($p['host'] != $host) { + if ( ($p['host'] != $host) || $is_host_check ) { echo '