XSS 취약점 수정 16-480
This commit is contained in:
@ -39,6 +39,7 @@ function g5_path()
|
|||||||
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
|
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
|
||||||
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
|
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
|
||||||
$host = preg_replace('/:[0-9]+$/', '', $host);
|
$host = preg_replace('/:[0-9]+$/', '', $host);
|
||||||
|
$host = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", '', $host);
|
||||||
$result['url'] = $http.$host.$port.$user.$root;
|
$result['url'] = $http.$host.$port.$user.$root;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user