diff --git a/adm/admin.lib.php b/adm/admin.lib.php index 7b5125e8c..0ab44f72c 100644 --- a/adm/admin.lib.php +++ b/adm/admin.lib.php @@ -477,7 +477,7 @@ function admin_check_xss_params($params){ if( is_array($value) ){ admin_check_xss_params($value); - } else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/onload=.*/ius', $value)) ){ + } else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value)) ){ alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.'); die(); } diff --git a/adm/board_list_update.php b/adm/board_list_update.php index 90a1c5d33..a7f358c1f 100644 --- a/adm/board_list_update.php +++ b/adm/board_list_update.php @@ -30,18 +30,18 @@ if ($_POST['act_button'] == "선택수정") { } $sql = " update {$g5['board_table']} - set gr_id = '".sql_real_escape_string($_POST['gr_id'][$k])."', - bo_subject = '".sql_real_escape_string($_POST['bo_subject'][$k])."', - bo_device = '".sql_real_escape_string($_POST['bo_device'][$k])."', - bo_skin = '".sql_real_escape_string($_POST['bo_skin'][$k])."', - bo_mobile_skin = '".sql_real_escape_string($_POST['bo_mobile_skin'][$k])."', - bo_read_point = '".sql_real_escape_string($_POST['bo_read_point'][$k])."', - bo_write_point = '".sql_real_escape_string($_POST['bo_write_point'][$k])."', - bo_comment_point = '".sql_real_escape_string($_POST['bo_comment_point'][$k])."', - bo_download_point = '".sql_real_escape_string($_POST['bo_download_point'][$k])."', - bo_use_search = '".sql_real_escape_string($_POST['bo_use_search'][$k])."', - bo_use_sns = '".sql_real_escape_string($_POST['bo_use_sns'][$k])."', - bo_order = '".sql_real_escape_string($_POST['bo_order'][$k])."' + set gr_id = '".sql_real_escape_string(strip_tags($_POST['gr_id'][$k]))."', + bo_subject = '".sql_real_escape_string(strip_tags($_POST['bo_subject'][$k]))."', + bo_device = '".sql_real_escape_string(strip_tags($_POST['bo_device'][$k]))."', + bo_skin = '".sql_real_escape_string(strip_tags($_POST['bo_skin'][$k]))."', + bo_mobile_skin = '".sql_real_escape_string(strip_tags($_POST['bo_mobile_skin'][$k]))."', + bo_read_point = '".sql_real_escape_string(strip_tags($_POST['bo_read_point'][$k]))."', + bo_write_point = '".sql_real_escape_string(strip_tags($_POST['bo_write_point'][$k]))."', + bo_comment_point = '".sql_real_escape_string(strip_tags($_POST['bo_comment_point'][$k]))."', + bo_download_point = '".sql_real_escape_string(strip_tags($_POST['bo_download_point'][$k]))."', + bo_use_search = '".sql_real_escape_string(strip_tags($_POST['bo_use_search'][$k]))."', + bo_use_sns = '".sql_real_escape_string(strip_tags($_POST['bo_use_sns'][$k]))."', + bo_order = '".sql_real_escape_string(strip_tags($_POST['bo_order'][$k]))."' where bo_table = '".sql_real_escape_string($_POST['board_table'][$k])."' "; sql_query($sql); diff --git a/adm/config_form.php b/adm/config_form.php index 1193a7b7f..738e0cdea 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -1317,7 +1317,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) { - + diff --git a/adm/config_form_update.php b/adm/config_form_update.php index 533782c7a..f8ebc22fa 100644 --- a/adm/config_form_update.php +++ b/adm/config_form_update.php @@ -28,7 +28,7 @@ $cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_title'] = strip_tags($_POST['cf_title']); -$check_keys = array('cf_lg_mid', 'cf_lg_mert_key', 'cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key'); +$check_keys = array('cf_lg_mid', 'cf_lg_mert_key', 'cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret'); foreach( $check_keys as $key ){ if ( isset($_POST[$key]) && $_POST[$key] ){ diff --git a/adm/contentform.php b/adm/contentform.php index 6217e4603..4abe574d9 100644 --- a/adm/contentform.php +++ b/adm/contentform.php @@ -86,11 +86,11 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
관리자 아이디는 영문자, 숫자, _ 만 입력하세요.
'); +} + $dblink = sql_connect($mysql_host, $mysql_user, $mysql_pass, $mysql_db); if (!$dblink) { ?> diff --git a/lib/common.lib.php b/lib/common.lib.php index a82bd6ea9..ab7431959 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2752,6 +2752,11 @@ function module_exec_check($exe, $type) } else { // 바이너리 파일인지 if($is_linux) { + + if ( !function_exists('exec') ) { + alert('exec 함수실행이 불가능하므로 사용할수 없습니다.'); + } + $search = false; $isbinary = true; $executable = true; @@ -3431,7 +3436,7 @@ function get_head_title($title){ global $g5; if( isset($g5['board_title']) && $g5['board_title'] ){ - $title = $g5['board_title']; + $title = strip_tags(get_text($g5['board_title'])); } return $title; @@ -3562,7 +3567,7 @@ function is_include_path_check($path='', $is_input='') if( preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) ){ return false; } - if( preg_match('/\.\.\//i', $replace_path) && preg_match('/plugin\//i', $replace_path) && preg_match('/okname\//i', $replace_path) ){ + if( (preg_match('/\.\.\//i', $replace_path) || preg_match('/^\/.*/i', $replace_path)) && preg_match('/plugin\//i', $replace_path) && preg_match('/okname\//i', $replace_path) ){ return false; } } diff --git a/plugin/okname/hpcert1.php b/plugin/okname/hpcert1.php index 45c64bd8f..d81aaeb73 100644 --- a/plugin/okname/hpcert1.php +++ b/plugin/okname/hpcert1.php @@ -1,8 +1,14 @@ Data = ""; // 발송하기 위한 패킷내용이 배열로 들어간다. - $this->Result = ""; // 발송결과값이 배열로 들어간다. + $this->Data = array(); // 발송하기 위한 패킷내용이 배열로 들어간다. + $this->Result = array(); // 발송결과값이 배열로 들어간다. } function Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate="", $nCount) { @@ -260,7 +260,7 @@ if($config['cf_sms_type'] == 'LMS') { $this->Result[] = "$phone:$code"; $this->Log[] = $puts; } - $this->Data = ""; + $this->Data = array(); return true; exit; } @@ -284,7 +284,7 @@ if($config['cf_sms_type'] == 'LMS') { } fclose($fsocket); - $this->Data = ""; + $this->Data = array(); return true; } } @@ -431,7 +431,7 @@ if($config['cf_sms_type'] == 'LMS') { $this->Result[] = "$phone:$code"; $this->Log[] = $puts; } - $this->Data = ""; + $this->Data = array(); return true; exit; } @@ -463,7 +463,7 @@ if($config['cf_sms_type'] == 'LMS') { if ($count++%1000 == 0) sleep(5); } fclose($fsocket); - $this->Data = ""; + $this->Data = array(); return true; } } diff --git a/plugin/syndi/ping.php b/plugin/syndi/ping.php index fe5610c01..ff869b876 100644 --- a/plugin/syndi/ping.php +++ b/plugin/syndi/ping.php @@ -29,7 +29,7 @@ $feed_updated = date('Y-m-d\TH:i:s\+09:00', G5_SERVER_TIME); $find = array('&', ' '); # 찾아서 $replace = array('&', ' '); # 바꾼다 -$content = str_replace( $find, $replace, $write['wr_content'] ); +$content = str_replace( $find, $replace, html_purifier($write['wr_content']) ); $summary = str_replace( $find, $replace, strip_tags($write['wr_content']) ); Header("Content-type: text/xml"); diff --git a/skin/board/gallery/list.skin.php b/skin/board/gallery/list.skin.php index 36b32bfbe..3ce791234 100644 --- a/skin/board/gallery/list.skin.php +++ b/skin/board/gallery/list.skin.php @@ -128,7 +128,7 @@ add_stylesheet('', 0