ZF-7364: same domain name in the GET parameters causes bad cleaning of REQUEST_URI and no matching controller

Issue Type: Bug Created: 2009-07-23T06:02:23.000+0000 Last Updated: 2009-09-18T11:57:20.000+0000 Status: Resolved Fix version(s): Reporter: Matthieu PLANTEY (plantex) Assignee: Jan Pieper (jpieper) Tags: - Zend_Controller

Related issues: - ZF-5818



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… , it tries to find the controller "&var2=foo".


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).

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.