Re: [CakePHP : The Rapid Development Framework for PHP] #5751: Ampersand bug in $this-params['pass'] and $this-params['url']
#5751: Ampersand bug in $this-params['pass'] and $this-params['url'] ---+ Reporter: xbuzz | Owner: Type: Bug |Status: reopened Priority: High| Milestone: Component: General | Version: RC3 Severity: Normal |Resolution: Keywords: | Php_version: PHP 5 Cake_version: 1.2.0.7692 RC3 | ---+ Comment (by bsweeney): I recently ran into this problem on a site I'm developing. The problem is definitely with the RewriteRule, because the bug is in Apache. The best description I've found was by Matthew Somerville[http://www.dracos.co.uk/code/apache-rewrite-problem/]. Essentially, Apache is unencoding ampersands when processing the URL through mod_rewrite, and not encoding any output. Hard to say how long a until a patch for Apache will be included. And should CakePHP rely on that, hack around the problem, or modify the way the URL is parsed? Personally the last of the three seems the most robust to me. In the meantime, I've found that triple-encoding ampersands (%252526) seems to work on my install. -- Ticket URL: https://trac.cakephp.org/ticket/5751#comment:4 CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/ Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups tickets cakephp group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to tickets-cakephp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #5751: Ampersand bug in $this-params['pass'] and $this-params['url']
#5751: Ampersand bug in $this-params['pass'] and $this-params['url'] ---+ Reporter: xbuzz | Owner: Type: Bug |Status: reopened Priority: High| Milestone: Component: General | Version: RC3 Severity: Normal |Resolution: Keywords: | Php_version: PHP 5 Cake_version: 1.2.0.7692 RC3 | ---+ Changes (by xbuzz): * status: closed = reopened * resolution: invalid = Comment: Nate, I understand that the string needs to be encoded. The problem is that if you use urlencode() the ampersand loses it's encoding prior to being handled by the application. Please take another look at this example. URL: http://localhost/test/view/This%20%26%20That/Other {{{ class ExampleController extends AppController { var $name = 'Example'; var $uses = array(); function view($category, $category2) { // http://shop.lycoz.com/example/view/This%20%26%20That/Other pr($this-params); die; } } }}} Output: Note: $this-params['pass'] is broken and $this-params['url'] is broken. {{{ Array ( [pass] = Array ( [0] = This ) [named] = Array ( ) [controller] = example [action] = view [plugin] = [form] = Array ( ) [url] = Array ( [url] = example/view/This [That/Other] = ) ) }}} Notice if you remove the ampersand (%26) it works fine. Array ( [pass] = Array ( [0] = This and That [1] = Other ) [named] = Array ( ) [controller] = example [action] = view [plugin] = [form] = Array ( ) [url] = Array ( [url] = example/view/This That/Other ) ) -- Ticket URL: https://trac.cakephp.org/ticket/5751#comment:3 CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/ Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups tickets cakephp group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #5751: Ampersand bug in $this-params['pass'] and $this-params['url']
#5751: Ampersand bug in $this-params['pass'] and $this-params['url'] ---+ Reporter: xbuzz | Owner: Type: Bug |Status: new Priority: High| Milestone: Component: General | Version: RC3 Severity: Normal |Resolution: Keywords: | Php_version: PHP 5 Cake_version: 1.2.0.7692 RC3 | ---+ Comment (by xbuzz): Possible problem with RewriteRule: RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] -- Ticket URL: https://trac.cakephp.org/ticket/5751#comment:1 CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/ Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups tickets cakephp group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #5751: Ampersand bug in $this-params['pass'] and $this-params['url']
#5751: Ampersand bug in $this-params['pass'] and $this-params['url'] ---+ Reporter: xbuzz | Owner: Type: Bug |Status: closed Priority: High| Milestone: Component: General | Version: RC3 Severity: Normal |Resolution: invalid Keywords: | Php_version: PHP 5 Cake_version: 1.2.0.7692 RC3 | ---+ Changes (by nate): * status: new = closed * resolution: = invalid Comment: Not sure I understand the issue, as what you're seeing is expected behavior -- if you want to use in your URLs for anything other than a querystring delimiter, encode it. -- Ticket URL: https://trac.cakephp.org/ticket/5751#comment:2 CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/ Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups tickets cakephp group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~--~~~~--~~--~--~---