Fixes #3427, MAGIC_QUOTES_GPC settings affecting parameters passed to actions

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5848 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-10-22 04:31:34 +00:00
parent 7767bb7e3d
commit 0873217a1f

View file

@ -340,6 +340,10 @@ class Router extends Object {
$out = array('pass' => array()); $out = array('pass' => array());
$r = $ext = null; $r = $ext = null;
if (ini_get('magic_quotes_gpc') == 1) {
$url = stripslashes_deep($url);
}
if ($url && strpos($url, '/') !== 0) { if ($url && strpos($url, '/') !== 0) {
$url = '/' . $url; $url = '/' . $url;
} }