mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Remove invalid characters from REQUEST_URI
This commit is contained in:
parent
b62a1322c9
commit
109203d12b
3 changed files with 11 additions and 3 deletions
|
|
@ -18,7 +18,8 @@ class URL
|
|||
*/
|
||||
public static function getCurrentURL(array $changes = array())
|
||||
{
|
||||
$url = self::getCurrentDomainURL(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/');
|
||||
$request_uri = preg_replace('/[<>"]/', '', isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/');
|
||||
$url = self::getCurrentDomainURL($request_uri);
|
||||
if (count($changes))
|
||||
{
|
||||
return self::modifyURL($url, $changes);
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ function getScriptPath()
|
|||
*/
|
||||
function getRequestUriByServerEnviroment()
|
||||
{
|
||||
return escape($_SERVER['REQUEST_URI']);
|
||||
return preg_replace('/[<>"]/', '', $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue