XSS 취약점 수정 16-480

This commit is contained in:
chicpro
2016-07-15 09:25:39 +09:00
parent b5592b8466
commit a79def43c5

View File

@ -39,6 +39,7 @@ function g5_path()
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
$host = preg_replace('/:[0-9]+$/', '', $host);
$host = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", '', $host);
$result['url'] = $http.$host.$port.$user.$root;
return $result;
}