[KVE-2020-0273]Cross Site Scripting(XSS) 취약점 수정

This commit is contained in:
thisgun
2020-04-27 15:45:21 +09:00
parent 4c41828e73
commit 468bc6eb1c
3 changed files with 8 additions and 3 deletions

View File

@ -477,8 +477,8 @@ 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|onerror]=.*/ius', $value))) || preg_match('/^(?=.*get_ajax_token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) ){
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
} else if ( (preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) || (preg_match('/[onload|onerror]=.*/ius', $value) && preg_match('/(eval|expression|exec|prompt)(\s*)\((.*)\)/ius', $value)) ){
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
die();
}
}

View File

@ -12,13 +12,13 @@ if(!in_array($theme, $theme_dir))
die('선택하신 테마가 설치되어 있지 않습니다.');
$info = get_theme_info($theme);
$name = get_text($info['theme_name']);
if($info['screenshot'])
$screenshot = '<img src="'.$info['screenshot'].'" alt="'.$name.'">';
else
$screenshot = '<img src="'.G5_ADMIN_URL.'/img/theme_img.jpg" alt="">';
$name = get_text($info['theme_name']);
if($info['theme_uri']) {
$name = '<a href="'.set_http($info['theme_uri']).'" target="_blank" class="thdt_home">'.$name.'</a>';
}

View File

@ -11,6 +11,11 @@ include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
$colspan = 6;
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처음으로 (초기화용도)
$sql_search = '';
if(isset($sfl) && $sfl && !in_array($sfl, array('vi_ip','vi_date','vi_time','vi_referer','vi_agent','vi_browser','vi_os','vi_device')) ) {
$sfl = '';
}
?>
<div class="local_sch local_sch01">