diff --git a/adm/board_form_update.php b/adm/board_form_update.php index c668136a5..8ddb1840c 100644 --- a/adm/board_form_update.php +++ b/adm/board_form_update.php @@ -80,8 +80,8 @@ $bo_category_list = isset($_POST['bo_category_list']) ? str_replace($src_char, $ //https://github.com/gnuboard/gnuboard5/commit/f5f4925d4eb28ba1af728e1065fc2bdd9ce1da58 에 따른 조치 $str_bo_category_list = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $bo_category_list); -$_POST['bo_subject'] = strip_tags($_POST['bo_subject']); -$_POST['bo_mobile_subject'] = strip_tags($_POST['bo_mobile_subject']); +$_POST['bo_subject'] = strip_tags(clean_xss_attributes($_POST['bo_subject'])); +$_POST['bo_mobile_subject'] = strip_tags(clean_xss_attributes($_POST['bo_mobile_subject'])); $sql_common = " gr_id = '{$gr_id}', bo_subject = '{$_POST['bo_subject']}', diff --git a/adm/board_list_update.php b/adm/board_list_update.php index 8a5ba44ec..552f60d99 100644 --- a/adm/board_list_update.php +++ b/adm/board_list_update.php @@ -33,7 +33,7 @@ if ($_POST['act_button'] == "선택수정") { alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.'); } - $p_bo_subject = is_array($_POST['bo_subject']) ? strip_tags($_POST['bo_subject'][$k]) : ''; + $p_bo_subject = is_array($_POST['bo_subject']) ? strip_tags(clean_xss_attributes($_POST['bo_subject'][$k])) : ''; $sql = " update {$g5['board_table']} set gr_id = '".sql_real_escape_string(strip_tags($_POST['gr_id'][$k]))."', diff --git a/adm/contentformupdate.php b/adm/contentformupdate.php index 41170884b..58437acda 100644 --- a/adm/contentformupdate.php +++ b/adm/contentformupdate.php @@ -21,7 +21,7 @@ if ($w == "" || $w == "u") } $co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id); -$co_subject = strip_tags($co_subject); +$co_subject = strip_tags(clean_xss_attributes($co_subject)); $co_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_head, 0, 255)); $co_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_tail, 0, 255)); $co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1; diff --git a/adm/newwinformupdate.php b/adm/newwinformupdate.php index fc2314800..74516634c 100644 --- a/adm/newwinformupdate.php +++ b/adm/newwinformupdate.php @@ -13,7 +13,7 @@ else check_admin_token(); -$nw_subject = isset($_POST['nw_subject']) ? strip_tags($_POST['nw_subject']) : ''; +$nw_subject = isset($_POST['nw_subject']) ? strip_tags(clean_xss_attributes($_POST['nw_subject'])) : ''; $sql_common = " nw_division = '{$_POST['nw_division']}', nw_device = '{$_POST['nw_device']}', diff --git a/adm/point_update.php b/adm/point_update.php index 571a1dfa6..ac1a70411 100644 --- a/adm/point_update.php +++ b/adm/point_update.php @@ -6,9 +6,9 @@ auth_check($auth[$sub_menu], 'w'); check_admin_token(); -$mb_id = strip_tags($_POST['mb_id']); -$po_point = strip_tags($_POST['po_point']); -$po_content = strip_tags($_POST['po_content']); +$mb_id = strip_tags(clean_xss_attributes($_POST['mb_id'])); +$po_point = strip_tags(clean_xss_attributes($_POST['po_point'])); +$po_content = strip_tags(clean_xss_attributes($_POST['po_content'])); $expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']); $mb = get_member($mb_id); diff --git a/adm/sms_admin/form_write.php b/adm/sms_admin/form_write.php index 6191bd59d..b8e4913f7 100644 --- a/adm/sms_admin/form_write.php +++ b/adm/sms_admin/form_write.php @@ -6,6 +6,8 @@ auth_check($auth[$sub_menu], "w"); $g5['title'] = "이모티콘 "; +$fg_no = isset($fg_no) ? (int) $fg_no : ''; + if ($w == 'u' && is_numeric($fo_no)) { $write = sql_fetch("select * from {$g5['sms5_form_table']} where fo_no='$fo_no'"); $g5['title'] .= '수정'; diff --git a/adm/sms_admin/num_book.php b/adm/sms_admin/num_book.php index 567e05f00..f4338c307 100644 --- a/adm/sms_admin/num_book.php +++ b/adm/sms_admin/num_book.php @@ -16,6 +16,8 @@ if ($page < 1) $page = 1; $bg_no = isset($bg_no) ? (int) $bg_no : 0; $st = isset($st) ? preg_replace('/[^a-z0-9]/i', '', $st) : ''; +$sql_korean = $sql_group = $sql_search = $sql_no_hp = ''; + if (is_numeric($bg_no)) $sql_group = " and bg_no='$bg_no' "; else @@ -127,9 +129,9 @@ function no_hp_click(val) onclick="no_hp_click(this.checked)"> diff --git a/adm/sms_admin/sms_write_form.php b/adm/sms_admin/sms_write_form.php index fdbf64c91..103535b5e 100644 --- a/adm/sms_admin/sms_write_form.php +++ b/adm/sms_admin/sms_write_form.php @@ -7,6 +7,8 @@ while ($res = sql_fetch_array($qry)) array_push($group, $res); $res = sql_fetch("select count(*) as cnt from `{$g5['sms5_form_table']}` where fg_no=0"); $no_count = $res['cnt']; + +$fg_no = isset($fg_no) ? (int) $fg_no : ''; ?>