Nope...still same thing. I will just secure the form myself and add security
to the controllers that need them individually for now.

Thanks again for your insight and fast response.

Dave

-----Original Message-----
From: brian [mailto:[email protected]] 
Sent: June-02-09 11:28 PM
To: [email protected]
Subject: Re: Security Component and AJAX


On Tue, Jun 2, 2009 at 9:37 PM, Dave Maharaj :: WidePixels.com
<[email protected]> wrote:
>
> My Ajax functions are in different controllers but I added
>
> function beforeFilter()
>      {
>          parent::beforeFilter();
>                if ($this->params['action'] == 'update_systems')
>                {
>                $this->Security->validatePost = false;
>                }
>      }

As it's AJAX requests that are the problem, I'd do this instead:

 function beforeFilter()
{
      parent::beforeFilter();

      if ($this->RequestHandler->isAjax())
      {
            $this->Security->validatePost = false;
      }
}



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to