diff --git a/adm/admin.lib.php b/adm/admin.lib.php index 0f824b269..ff2b9766c 100644 --- a/adm/admin.lib.php +++ b/adm/admin.lib.php @@ -389,7 +389,7 @@ function order_select($fld, $sel = '') // 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴 function get_admin_token() { - $token = md5(uniqid(rand(), true)); + $token = get_random_token_string(16); set_session('ss_admin_token', $token); return $token; diff --git a/adm/admin.tail.php b/adm/admin.tail.php index 68b6dae12..a44a66acc 100644 --- a/adm/admin.tail.php +++ b/adm/admin.tail.php @@ -17,7 +17,7 @@ $print_version = ($is_admin == 'super') ? 'Version ' . G5_GNUBOARD_VER : ''; diff --git a/adm/board_form_update.php b/adm/board_form_update.php index 83ff74b52..713661932 100644 --- a/adm/board_form_update.php +++ b/adm/board_form_update.php @@ -139,7 +139,7 @@ $bo_hot = isset($_POST['bo_hot']) ? (int) $_POST['bo_hot'] : 0; $bo_image_width = isset($_POST['bo_image_width']) ? (int) $_POST['bo_image_width'] : 0; $bo_use_search = isset($_POST['bo_use_search']) ? (int) $_POST['bo_use_search'] : 0; $bo_use_cert = isset($_POST['bo_use_cert']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['bo_use_cert']) : ''; -$bo_device = isset($_POST['bo_device']) ? clean_xss_tags($_POST['bo_device'], 1, 1) : ''; +$bo_device = isset($_POST['bo_device']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_device']), 1, 1)) : ''; $bo_list_level = isset($_POST['bo_list_level']) ? (int) $_POST['bo_list_level'] : 0; $bo_read_level = isset($_POST['bo_read_level']) ? (int) $_POST['bo_read_level'] : 0; $bo_write_level = isset($_POST['bo_write_level']) ? (int) $_POST['bo_write_level'] : 0; @@ -155,9 +155,9 @@ $bo_read_point = isset($_POST['bo_read_point']) ? (int) $_POST['bo_read_point'] $bo_write_point = isset($_POST['bo_write_point']) ? (int) $_POST['bo_write_point'] : 0; $bo_comment_point = isset($_POST['bo_comment_point']) ? (int) $_POST['bo_comment_point'] : 0; $bo_download_point = isset($_POST['bo_download_point']) ? (int) $_POST['bo_download_point'] : 0; -$bo_select_editor = isset($_POST['bo_select_editor']) ? clean_xss_tags($_POST['bo_select_editor'], 1, 1) : ''; -$bo_skin = isset($_POST['bo_skin']) ? clean_xss_tags($_POST['bo_skin'], 1, 1) : ''; -$bo_mobile_skin = isset($_POST['bo_mobile_skin']) ? clean_xss_tags($_POST['bo_mobile_skin'], 1, 1) : ''; +$bo_select_editor = isset($_POST['bo_select_editor']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_select_editor']), 1, 1)) : ''; +$bo_skin = isset($_POST['bo_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_skin']), 1, 1)) : ''; +$bo_mobile_skin = isset($_POST['bo_mobile_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_mobile_skin']), 1, 1)) : ''; $bo_content_head = isset($_POST['bo_content_head']) ? $_POST['bo_content_head'] : ''; $bo_content_tail = isset($_POST['bo_content_tail']) ? $_POST['bo_content_tail'] : ''; $bo_mobile_content_head = isset($_POST['bo_mobile_content_head']) ? $_POST['bo_mobile_content_head'] : ''; @@ -176,7 +176,7 @@ $bo_write_min = isset($_POST['bo_write_min']) ? (int) $_POST['bo_write_min'] : 0 $bo_write_max = isset($_POST['bo_write_max']) ? (int) $_POST['bo_write_max'] : 0; $bo_comment_min = isset($_POST['bo_comment_min']) ? (int) $_POST['bo_comment_min'] : 0; $bo_comment_max = isset($_POST['bo_comment_max']) ? (int) $_POST['bo_comment_max'] : 0; -$bo_sort_field = isset($_POST['bo_sort_field']) ? clean_xss_tags($_POST['bo_sort_field'], 1, 1) : ''; +$bo_sort_field = isset($_POST['bo_sort_field']) ? addslashes(clean_xss_tags(stripslashes($_POST['bo_sort_field']), 1, 1)) : ''; if (strpbrk($bo_skin.$bo_mobile_skin, "?%*:|\"<>") !== false) { alert('스킨 디렉토리명 오류!'); diff --git a/adm/contentformupdate.php b/adm/contentformupdate.php index 2f88546be..61eac97ab 100644 --- a/adm/contentformupdate.php +++ b/adm/contentformupdate.php @@ -35,8 +35,8 @@ $co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0; $co_html = isset($_POST['co_html']) ? (int) $_POST['co_html'] : 0; $co_content = isset($_POST['co_content']) ? $_POST['co_content'] : ''; $co_mobile_content = isset($_POST['co_mobile_content']) ? $_POST['co_mobile_content'] : ''; -$co_skin = isset($_POST['co_skin']) ? clean_xss_tags($_POST['co_skin'], 1, 1) : ''; -$co_mobile_skin = isset($_POST['co_mobile_skin']) ? clean_xss_tags($_POST['co_mobile_skin'], 1, 1) : ''; +$co_skin = isset($_POST['co_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['co_skin']), 1, 1)) : ''; +$co_mobile_skin = isset($_POST['co_mobile_skin']) ? addslashes(clean_xss_tags(stripslashes($_POST['co_mobile_skin']), 1, 1)) : ''; // 관리자가 자동등록방지를 사용해야 할 경우 if (((isset($co_row['co_include_head']) && $co_row['co_include_head'] !== $co_include_head) || (isset($co_row['co_include_tail']) && $co_row['co_include_tail'] !== $co_include_tail)) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) { diff --git a/adm/mail_select_form.php b/adm/mail_select_form.php index 62ea8f91b..b8c62ab5f 100644 --- a/adm/mail_select_form.php +++ b/adm/mail_select_form.php @@ -80,7 +80,7 @@ require_once './admin.head.php';