From 45244de78ee36e93668285561c99dac22591cdcb Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 9 Jul 2015 13:46:17 +0900 Subject: [PATCH 01/28] =?UTF-8?q?XSS=20=EC=B7=A8=EC=95=BD=EC=A0=90=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 8 ++------ mobile/skin/member/basic/login.skin.php | 2 +- skin/member/basic/login.skin.php | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 53eb1f1df..091ba8cb4 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2367,12 +2367,8 @@ function hyphen_hp_number($hp) function login_url($url='') { if (!$url) $url = G5_URL; - /* - $p = parse_url($url); - echo urlencode($_SERVER['REQUEST_URI']); - return $url.urldecode(preg_replace("/^".urlencode($p['path'])."/", "", urlencode($_SERVER['REQUEST_URI']))); - */ - return $url; + + return urlencode(clean_xss_tags($url)); } diff --git a/mobile/skin/member/basic/login.skin.php b/mobile/skin/member/basic/login.skin.php index 3274b7dd8..3d704f392 100644 --- a/mobile/skin/member/basic/login.skin.php +++ b/mobile/skin/member/basic/login.skin.php @@ -9,7 +9,7 @@ add_stylesheet('',

- +
diff --git a/skin/member/basic/login.skin.php b/skin/member/basic/login.skin.php index 18771e54c..86772c70d 100644 --- a/skin/member/basic/login.skin.php +++ b/skin/member/basic/login.skin.php @@ -10,7 +10,7 @@ add_stylesheet('',

- +
회원로그인 From 2fc315c51e0658026c38c1afaffa2ba59d9f837e Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 9 Jul 2015 16:25:20 +0900 Subject: [PATCH 02/28] =?UTF-8?q?=EC=A4=91=EB=B3=B5=20urlencode=20?= =?UTF-8?q?=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 --- lib/common.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 091ba8cb4..d8f4bc557 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2368,7 +2368,7 @@ function login_url($url='') { if (!$url) $url = G5_URL; - return urlencode(clean_xss_tags($url)); + return urlencode(clean_xss_tags(urldecode($url))); } From e5eddb22b76abc6ee7b2de7ac1248af6458f8a60 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 10 Jul 2015 08:58:40 +0900 Subject: [PATCH 03/28] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=B2=A0=EC=8A=A4=ED=8A=B8=20=EC=83=81?= =?UTF-8?q?=ED=92=88=20=EC=8A=AC=EB=9D=BC=EC=9D=B4=EB=93=9C=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=98=A4=EB=A5=98=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 --- mobile/skin/shop/basic/list.best.10.skin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/skin/shop/basic/list.best.10.skin.php b/mobile/skin/shop/basic/list.best.10.skin.php index d170fb482..0beae55fb 100644 --- a/mobile/skin/shop/basic/list.best.10.skin.php +++ b/mobile/skin/shop/basic/list.best.10.skin.php @@ -108,7 +108,7 @@ if($this->total_count > 0) { var count = $slides.size(); var width, outerW; - if(count < 2) + if(count < 1) return; function button_change(idx) From 54aa905699d6a08b6295b0f9a8631ec5c717d5b7 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 13 Jul 2015 10:54:32 +0900 Subject: [PATCH 04/28] =?UTF-8?q?=EB=B2=84=EC=A0=84=EB=B3=80=EA=B2=BD?= 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 a99fd63ca..564f8afd2 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ ********************/ define('G5_VERSION', '그누보드5'); -define('G5_GNUBOARD_VER', '5.0.39'); +define('G5_GNUBOARD_VER', '5.0.40'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); From 9356fdfaa86c7eb9a97ac89b6a5bc45197907e3d Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 13 Jul 2015 17:20:00 +0900 Subject: [PATCH 05/28] =?UTF-8?q?=ED=8C=9D=EC=97=85=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=96=B4=20=EC=A4=91=EB=B3=B5=20=EC=BF=BC=EB=A6=AC=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 --- bbs/newwin.inc.php | 7 ++----- mobile/newwin.inc.php | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/bbs/newwin.inc.php b/bbs/newwin.inc.php index 3c3c8c127..e3f8aed55 100644 --- a/bbs/newwin.inc.php +++ b/bbs/newwin.inc.php @@ -13,14 +13,11 @@ $result = sql_query($sql, false);

팝업레이어 알림

diff --git a/mobile/newwin.inc.php b/mobile/newwin.inc.php index 14ad49127..bfd3eadfc 100644 --- a/mobile/newwin.inc.php +++ b/mobile/newwin.inc.php @@ -13,14 +13,11 @@ $result = sql_query($sql, false);

팝업레이어 알림

From 164944dd0c69b3a06edd093a9d67616189156b5a Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 14 Jul 2015 12:10:44 +0900 Subject: [PATCH 06/28] =?UTF-8?q?XSS=20=EC=B7=A8=EC=95=BD=EC=A0=90=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/alert.php | 3 ++- bbs/confirm.php | 4 ++++ bbs/move.php | 2 +- bbs/new.php | 2 ++ bbs/register_form.php | 3 +++ bbs/search.php | 2 +- lib/common.lib.php | 7 ++++++- skin/new/basic/new.skin.php | 1 - 8 files changed, 19 insertions(+), 5 deletions(-) diff --git a/bbs/alert.php b/bbs/alert.php index d64b6f2fd..6b1ab26a7 100644 --- a/bbs/alert.php +++ b/bbs/alert.php @@ -30,7 +30,8 @@ include_once(G5_PATH.'/head.sub.php'); $msg2 = str_replace("\\n", "
", $msg); -if (!$url) $url = $_SERVER['HTTP_REFERER']; +$url = clean_xss_tags($url); +if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER']); // url 체크 check_url_host($url); diff --git a/bbs/confirm.php b/bbs/confirm.php index 76e9c7652..fcf94e0e9 100644 --- a/bbs/confirm.php +++ b/bbs/confirm.php @@ -2,6 +2,10 @@ include_once('./_common.php'); include_once(G5_PATH.'/head.sub.php'); +$url1 = clean_xss_tags($url1); +$url2 = clean_xss_tags($url2); +$url3 = clean_xss_tags($url3); + // url 체크 check_url_host($url1); check_url_host($url2); diff --git a/bbs/move.php b/bbs/move.php index e3a7d86f2..a4631addf 100644 --- a/bbs/move.php +++ b/bbs/move.php @@ -55,7 +55,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) - +
diff --git a/bbs/new.php b/bbs/new.php index bbf9ccf96..9e008e861 100644 --- a/bbs/new.php +++ b/bbs/new.php @@ -17,6 +17,8 @@ if ($view == "w") $sql_common .= " and a.wr_id = a.wr_parent "; else if ($view == "c") $sql_common .= " and a.wr_id <> a.wr_parent "; +else + $view = ''; $mb_id = isset($_GET['mb_id']) ? ($_GET['mb_id']) : ''; $mb_id = substr(preg_replace('#[^a-z0-9_]#i', '', $mb_id), 0, 20); diff --git a/bbs/register_form.php b/bbs/register_form.php index cb6fd2517..e6583e111 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -30,6 +30,9 @@ if ($w == "") { alert('개인정보처리방침안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.', G5_BBS_URL.'/register.php'); } + $agree = preg_replace('#[^0-9]#', '', $_POST['agree']); + $agree2 = preg_replace('#[^0-9]#', '', $_POST['agree2']); + $member['mb_birth'] = ''; $member['mb_sex'] = ''; $member['mb_name'] = ''; diff --git a/bbs/search.php b/bbs/search.php index 4f4df3f19..0f3fe803b 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -17,7 +17,7 @@ if ($stx) { $stx = preg_replace('/\//', '\/', trim($stx)); $sop = strtolower($sop); if (!$sop || !($sop == 'and' || $sop == 'or')) $sop = 'and'; // 연산자 and , or - $srows = isset($_GET['srows']) ? preg_replace('#[^0-9]#', '', $_GET['srows']) : 10; + $srows = isset($_GET['srows']) ? (int)preg_replace('#[^0-9]#', '', $_GET['srows']) : 10; if (!$srows) $srows = 10; // 한페이지에 출력하는 검색 행수 $g5_search['tables'] = Array(); diff --git a/lib/common.lib.php b/lib/common.lib.php index d8f4bc557..c7f842586 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -192,7 +192,7 @@ function confirm($msg, $url1='', $url2='', $url3='') alert($msg); } - if (!$url3) $url3 = $_SERVER['HTTP_REFERER']; + if (!$url3) $url3 = clean_xss_tags($_SERVER['HTTP_REFERER']); $msg = str_replace("\\n", "
", $msg); @@ -2723,6 +2723,11 @@ function clean_xss_tags($str) { $str = preg_replace('#]*+>#i', '', $str); + $search = array('"', "'"); + $replace = array('"', '''); + + $str = str_replace($search, $replace, $str); + return $str; } diff --git a/skin/new/basic/new.skin.php b/skin/new/basic/new.skin.php index 085eec0e6..2558d8118 100644 --- a/skin/new/basic/new.skin.php +++ b/skin/new/basic/new.skin.php @@ -45,7 +45,6 @@ add_stylesheet('', 0); - From 9a44ca14b53b320ede837ed32b366d86fdc1be64 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 14 Jul 2015 13:33:45 +0900 Subject: [PATCH 07/28] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=EC=83=81=ED=92=88=20=EC=B6=9C=EB=A0=A5=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=A0=81=EC=9A=A9=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8A=94=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 --- mobile/skin/shop/basic/item.form.skin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/skin/shop/basic/item.form.skin.php b/mobile/skin/shop/basic/item.form.skin.php index 2adeb5e18..c1fce1d0d 100644 --- a/mobile/skin/shop/basic/item.form.skin.php +++ b/mobile/skin/shop/basic/item.form.skin.php @@ -281,7 +281,7 @@ add_stylesheet('', 0 재입고알림 WISH - + @@ -319,6 +319,7 @@ add_stylesheet('', 0 +

WITH ITEM

@@ -336,6 +337,7 @@ add_stylesheet('', 0
+