and I added $this->Security->validatePost = false; to the
beforefilter action of each controller and everything seems to work
fine. I still get https enforced which is good through requireSecure
method. Obviously this isn't the ideal solution. If anyone has
encountered these issues ping me
thanks!
saliem
On Dec 1, 7:53 pm, Saliem <than.sal...@gmail.com> wrote:
> Hi Everyone,
>
> I'm having some trouble using using the security component. No data is
> getting through to where I want it and I keep getting blackholed. If I
> take out the security component everything works fine and the data
> goes through. I've already constructed every element of my forms
> using the form helper so I'm not sure what else needs to be done. Is
> there anywhere else I can go to for information about this?
>
> Thanks,
>
> ###################### a_controller.php ##############################
>
> class AController extends AppController {
>
> var $name = 'A';
>
> var $helpers = array('Ajax','Html','Form','Paginator',
> 'Fieldformatting');
>
> var $components = array('Security', 'Session', 'Email', 'Crypter',
> 'RequestHandler');
>
> function beforeFilter() {
>
> parent::beforeFilter();
>
> $this->Security->allowedControllers = array('B');
> $this->Security->blackHoleCallback = 'forceSSL';
> $this->Security->requireSecure();
>
> }
>
> function forceSSL() {
> $this->redirect('https://' . env('SERVER_NAME') . $this->here);
> }
>
> function action_a() {
> if ($this->data) {
> // do something with this data and set some session
> variables, then redirect to action_b to displays this data
>
> }
>
> function action_b() {
> // read session variables and set some variables
> using data from action_a for the corresponding view
>
> }
>
> }
>
> ###################### end of a_controller.php#######################
>
> ###################### b_controller.php ###########################
>
> class BController extends AppController {
>
> var $name = 'B';
>
> var $helpers = array('Form', 'Ajax', 'Html', 'Cropimage',
> 'Paginator', 'Fieldformatting', 'Resizeimage');
> var $components = array('Session', 'Email', 'JqImgcrop',
> 'RequestHandler', 'Navigation', 'Security');
>
> function action_b() {
> // set some data to some variables so that data
> can be used to construct form elements in the corresponding view
>
> }}
>
> ############### end of b_controller.php
> #################################
>
> ############# b/action_b.ctp ###################################
>
> form helper used to construct a form that consists of hidden elements
> and select menus to send data to a/action_a/
>
> ########### end of b/action_b.ctp #####################
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
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:
Post a Comment