More investigation: There's a related ticket open:
https://trac.cakephp.org/ticket/5751
I've fixed it in the short turn by double urlencoding my parameters :-
S
urlencode(urlencode($value))
Here's my code:
function _buildFilter() {
$url = array("action"=>"index");
foreach($this->data as $model=>$values) {
foreach($values as $key=>$value) {
$url["{$model}.{$key}"] =
urlencode(urlencode($value));
}
}
return $url;
}
- takes posted form data and returns a url array suitable for passing
into $this->redirect($url);
On May 14, 3:08 pm, "rich...@home" <[email protected]> wrote:
> I'm back trying to fix this issue and it's starting to be a bit of a
> pain :-(
>
> This is definitely a problem with the default CakePHP setup because if
> I create a simple php file:
>
> index.php:
> <?php
>
> phpinfo();
>
> I can access the file withhttp://example.com/index.php?a=%
> and don't get a bad request (even though technically it IS a malformed
> url).
>
> php parses it out to be:
> _SERVER["QUERY_STRING"] a=%
>
> or with
>
> http://example.com/index.php?a=%25
> (a valid url)
> _SERVER["QUERY_STRING"] a=%25
>
> Malcolm's observation about double escaping appears to be right on the
> money.
>
> So, dear CakePHP Dev's. What did you do on cakephp.org to stop %'s
> breaking the site?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---