KVE-2018-0732 취약점 수정

This commit is contained in:
thisgun
2018-10-01 10:48:59 +09:00
parent 6025f10116
commit 7524d29188
3 changed files with 23 additions and 8 deletions

View File

@ -489,6 +489,19 @@ if (isset($stx)) $arr_query[] = 'stx='.$stx;
if (isset($page)) $arr_query[] = 'page='.$page;
$qstr = implode("&", $arr_query);
if ( isset($_REQUEST) && $_REQUEST ){
if( admin_referer_check(true) ){
foreach( $_REQUEST as $key=>$value ){
if( $value && preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && preg_match('/script.*?\/script/ius', $value) ){
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
die();
}
}
}
}
// 관리자에서는 추가 스크립트는 사용하지 않는다.
//$config['cf_add_script'] = '';
?>