Skip to content

Commit

Permalink
[KVE-2020-0273]Cross Site Scripting(XSS) 취약점 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Apr 27, 2020
1 parent 4c41828 commit 468bc6e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions adm/admin.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
2 changes: 1 addition & 1 deletion adm/theme_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
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>';
}
Expand Down
5 changes: 5 additions & 0 deletions adm/visit_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

$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">
Expand Down

0 comments on commit 468bc6e

Please sign in to comment.