그누보드 영카트 다중 취약점(17-1029, 17-1047) 수정
This commit is contained in:
@ -355,6 +355,17 @@ function get_admin_token()
|
||||
return $token;
|
||||
}
|
||||
|
||||
//input value 에서 xss 공격 filter 역할을 함 ( 반드시 input value='' 타입에만 사용할것 )
|
||||
function get_sanitize_input($s, $is_html=false){
|
||||
|
||||
if(!$is_html){
|
||||
$s = strip_tags($s);
|
||||
}
|
||||
|
||||
$s = htmlspecialchars($s, ENT_QUOTES, 'utf-8');
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
|
||||
function check_admin_token()
|
||||
|
||||
@ -36,11 +36,11 @@ if ($file = $_POST['bo_include_tail']) {
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_head'], 1)) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
|
||||
alert('상단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
|
||||
}
|
||||
|
||||
if(!is_include_path_check($_POST['bo_include_tail'], 1)) {
|
||||
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
|
||||
alert('하단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
|
||||
}
|
||||
|
||||
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
@ -5,6 +5,9 @@ include_once("./_common.php");
|
||||
$spage_size = 20;
|
||||
$colspan = 10;
|
||||
|
||||
$st = isset($st) ? strip_tags($st) : '';
|
||||
$ssv = isset($ssv) ? strip_tags($ssv) : '';
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = "문자전송 상세내역";
|
||||
@ -64,18 +67,18 @@ function all_send()
|
||||
</script>
|
||||
|
||||
<form name="search_form" method="get" action="<?php echo $_SERVER['SCRIPT_NAME']?>" class="local_sch01 local_sch">
|
||||
<input type="hidden" name="wr_no" value="<?php echo $wr_no?>">
|
||||
<input type="hidden" name="wr_renum" value="<?php echo $wr_renum?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page?>">
|
||||
<input type="hidden" name="st" value="<?php echo $st?>">
|
||||
<input type="hidden" name="sv" value="<?php echo $sv?>">
|
||||
<input type="hidden" name="wr_no" value="<?php echo get_sanitize_input($wr_no); ?>">
|
||||
<input type="hidden" name="wr_renum" value="<?php echo get_sanitize_input($wr_renum); ?>">
|
||||
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
|
||||
<input type="hidden" name="st" value="<?php echo get_sanitize_input($st); ?>">
|
||||
<input type="hidden" name="sv" value="<?php echo get_sanitize_input($sv); ?>">
|
||||
<label for="sst" class="sound_only">검색대상</label>
|
||||
<select name="sst" id="sst">
|
||||
<option value="hs_name" <?php echo get_selected('hs_name', $sst); ?>>이름</option>
|
||||
<option value="hs_hp" <?php echo get_selected('hs_hp', $sst); ?>>휴대폰번호</option>
|
||||
</select>
|
||||
<label for="ssv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="ssv" value="<?php echo $ssv?>" id="ssv" class="frm_input">
|
||||
<input type="text" name="ssv" value="<?php echo get_sanitize_input($ssv); ?>" id="ssv" class="frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user