From a47162dffa39e43885092022f308591a46ca59be Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 13 Feb 2020 13:48:58 +0900 Subject: [PATCH] =?UTF-8?q?[KVE-1574,1575,1576,1577]=EC=98=81=EC=B9=B4?= =?UTF-8?q?=ED=8A=B8=20XSS=20=EC=B7=A8=EC=95=BD=EC=A0=90=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 --- adm/shop_admin/bannerform.php | 2 +- adm/shop_admin/bannerformupdate.php | 4 ++-- adm/shop_admin/categoryform.php | 6 +++--- adm/shop_admin/categoryformupdate.php | 5 +++++ adm/shop_admin/categorylistupdate.php | 4 ++-- adm/shop_admin/configform.php | 22 +++++++++++----------- adm/shop_admin/configformupdate.php | 2 +- adm/shop_admin/itemform.php | 2 +- adm/shop_admin/itemformupdate.php | 2 +- 9 files changed, 27 insertions(+), 22 deletions(-) diff --git a/adm/shop_admin/bannerform.php b/adm/shop_admin/bannerform.php index 4b7b1fe42..2cda1c67a 100644 --- a/adm/shop_admin/bannerform.php +++ b/adm/shop_admin/bannerform.php @@ -81,7 +81,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php'); - + diff --git a/adm/shop_admin/bannerformupdate.php b/adm/shop_admin/bannerformupdate.php index 7cf40561f..cd2a9ff2b 100644 --- a/adm/shop_admin/bannerformupdate.php +++ b/adm/shop_admin/bannerformupdate.php @@ -34,8 +34,8 @@ if( $bn_bimg || $bn_bimg_name ){ } } -$bn_url = clean_xss_tags($bn_url); -$bn_alt = function_exists('clean_xss_attributes') ? clean_xss_attributes(strip_tags($bn_alt)) : strip_tags($bn_alt); +$bn_url = strip_tags(clean_xss_attributes($bn_url)); +$bn_alt = strip_tags(clean_xss_attributes($bn_alt)); if ($w=="") { diff --git a/adm/shop_admin/categoryform.php b/adm/shop_admin/categoryform.php index 9f5fb6bea..5c4a10ec0 100644 --- a/adm/shop_admin/categoryform.php +++ b/adm/shop_admin/categoryform.php @@ -184,9 +184,9 @@ else { - + - + @@ -306,7 +306,7 @@ else { - + diff --git a/adm/shop_admin/categoryformupdate.php b/adm/shop_admin/categoryformupdate.php index a00322583..2d7b37b3e 100644 --- a/adm/shop_admin/categoryformupdate.php +++ b/adm/shop_admin/categoryformupdate.php @@ -48,6 +48,11 @@ foreach( $check_keys as $key ){ } } +$check_str_keys = array('ca_name', 'ca_mb_id', 'ca_sell_email'); +foreach( $check_str_keys as $key ){ + $$key = $_POST[$key] = strip_tags(clean_xss_attributes($_POST[$key])); +} + $ca_include_head = $_POST['ca_include_head']; $ca_include_tail = $_POST['ca_include_tail']; diff --git a/adm/shop_admin/categorylistupdate.php b/adm/shop_admin/categorylistupdate.php index 6ec9e4061..4b42b67c9 100644 --- a/adm/shop_admin/categorylistupdate.php +++ b/adm/shop_admin/categorylistupdate.php @@ -60,11 +60,11 @@ for ($i=0; $i - + - + - + - + - + - + - + - + - + - + - + diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index 55f1109da..dc3a76056 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -232,7 +232,7 @@ $check_sanitize_keys = array( ); foreach( $check_sanitize_keys as $key ){ - $$key = isset($_POST[$key]) ? strip_tags($_POST[$key]) : ''; + $$key = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : ''; } // diff --git a/adm/shop_admin/itemform.php b/adm/shop_admin/itemform.php index 17660c5fe..d2fe1f165 100644 --- a/adm/shop_admin/itemform.php +++ b/adm/shop_admin/itemform.php @@ -449,7 +449,7 @@ if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false) - + diff --git a/adm/shop_admin/itemformupdate.php b/adm/shop_admin/itemformupdate.php index 17616fd29..ef9f53372 100644 --- a/adm/shop_admin/itemformupdate.php +++ b/adm/shop_admin/itemformupdate.php @@ -301,7 +301,7 @@ $check_sanitize_keys = array( ); foreach( $check_sanitize_keys as $key ){ - $$key = isset($_POST[$key]) ? strip_tags($_POST[$key]) : ''; + $$key = isset($_POST[$key]) ? strip_tags(clean_xss_attributes($_POST[$key])) : ''; } if ($it_name == "")