ZF-7364: same domain name in the GET parameters causes bad cleaning of REQUEST_URI and no matching controller
Description
In the file Zend/Controller/Request/Http.php , the function setRequestUri make a clean URI to give it to the dispatcher. With the lines : if (isset($_SERVER['HTTP_HOST']) && strstr($requestUri, $_SERVER['HTTP_HOST'])) { $requestUri = preg_replace('#^[^:]*://[^/]*/#', '/', $requestUri); } the domain name disappears if it appears among the $_SERVER['REQUEST_URI']. But, for example, apache doesn't put the requested domain in the REQUEST_URI, only the part after the first "/".
If you have the same domain name in the GET parameter and so in the REQUEST_URI, it causes a bad cleaning and Zend doesn't find any matching controller. So if you try to get http://mydomain.com//… , it tries to find the controller "&var2=foo".
Comments
Posted by Jan Pieper (jpieper) on 2009-09-17T23:25:17.000+0000
Seems to be something like ZF-7824. I'll look at it in the evening.
Posted by Jan Pieper (jpieper) on 2009-09-18T11:54:56.000+0000
Already fixed since r14900 (ZF-5818).