Sunday, March 29, 2009

Re: Security white paging (blackholes) on certain pages

On Sun, Mar 29, 2009 at 5:23 PM, Miles J <mileswjohnson@gmail.com> wrote:
>
> So I have the Security Component enabled on my application. The
> component works fine on nearly all forms EXCEPT forms where I have a
> hidden input (created by form helper), or where I have created an
> input without the form helper.
>
> Heres an example that I do without the form helper (multiple
> checkboxes):
>
> <input type="checkbox" name="data[Comment][comments][]" value="<?php
> echo $comment['Comment']['id']; ?>" />
>
> And then I have a hidden form (that is filled with data by
> javascript):
>
> <?php echo $form->input('order', array('type' => 'hidden')); ?>
>
> Is there a way to get these forms working, without having to disable
> the security: $this->Security->validatePost = false?

You have to use FormHelper with SecurityComponent.

For the situation where you want to have JS populate your hidden field
values, I suspect you'd be out of luck. That hadn't occurred to me
before. If this is so, it'll probably keep me from using it.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: