[KVE-2019-0335, 0344 다중 취약점] 수정
This commit is contained in:
@ -35,6 +35,7 @@ $url = clean_xss_tags($url);
|
||||
if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER']);
|
||||
|
||||
$url = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", $url);
|
||||
$url = preg_replace('/\r\n|\r|\n|[^\x20-\x7e]/','', $url);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url, $msg);
|
||||
@ -48,11 +49,9 @@ if($error) {
|
||||
|
||||
<script>
|
||||
alert("<?php echo $msg; ?>");
|
||||
//document.location.href = "<?php echo $url; ?>";
|
||||
<?php if ($url) { ?>
|
||||
document.location.replace("<?php echo str_replace('&', '&', $url); ?>");
|
||||
<?php } else { ?>
|
||||
//alert('history.back();');
|
||||
history.back();
|
||||
<?php } ?>
|
||||
</script>
|
||||
|
||||
@ -2,9 +2,15 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$url1 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url1));
|
||||
$url2 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url2));
|
||||
$url3 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url3));
|
||||
$pattern1 = "/[\<\>\'\"\\\'\\\"\(\)]/";
|
||||
$pattern2 = "/\r\n|\r|\n|[^\x20-\x7e]/";
|
||||
|
||||
$url1 = preg_replace($pattern1, "", clean_xss_tags($url1));
|
||||
$url1 = preg_replace($pattern2, "", $url1);
|
||||
$url2 = preg_replace($pattern1, "", clean_xss_tags($url2));
|
||||
$url2 = preg_replace($pattern2, "", $url2);
|
||||
$url3 = preg_replace($pattern1, "", clean_xss_tags($url3));
|
||||
$url3 = preg_replace($pattern2, "", $url3);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url1);
|
||||
|
||||
Reference in New Issue
Block a user