Re: Problem with Security component and form submit

2009-10-07 Thread WebbedIT

@martin:  I am having problems with security and a white screen.  I
suspect it's a field using TinyMCE which is causing my token to fail,
and I am aware of how to specify a blackHoleCallback method, but what
should I be placing in my echo debug(); to see security's errors?

I don't want to disable security, and don;t want to exclude my TinyMCE
field as it is the likely place where someone may try and inject dodgy
code.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-10-07 Thread WebbedIT

My problem was not TinyMCE it was down to a field I had set as
disabled=true ... it needed added to security's disabledFields
attributes to allow the form to submit.

Would still like to know if there is a way to get Security to tell you
which field it is that's caused it to blackhole a request though.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problem with Security component and form submit

2009-09-10 Thread marco.rizze...@gmail.com

Hi
I use Security component and I have a view like this:

?php e($form-create(NULL, array( 'url' = '/test/'))); ?
div
?php echo $form-input('testValue',array('name'='data[testValue]',
'id'='testValue','label' = 'strongTest Value/strong:','options'
= $testValues)); ?
/div
div class=unit lastUnit
?php
e($form-end(__d('buttons',Try,true)));
?
/div

When I try to submit the form I get a white page.
Can someone explain me what happens?
Marco
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread WebbedIT

How do you know if this is a security component issue as the form is
not being submitted to a Controller/Action to be processed?!?

What should happen if the form submits to the url /test/?
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread byqsri



On 10 Set, 11:16, WebbedIT p...@webbedit.co.uk wrote:
 How do you know if this is a security component issue as the form is
 not being submitted to a Controller/Action to be processed?!?

Because if I don't use the Security component the form is correctly
submit.

 What should happen if the form submits to the url /test/?
It doesn't anything.Simply it reloads the page.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread Bert Van den Brande

A clean white page suggests an error that can't be shown because you
have set the debug level to 0.

Try setting it to 1 or 2 and see if the 'white page' now outputs an
error message.

On Thu, Sep 10, 2009 at 11:32 AM, byqsri marco.rizze...@gmail.com wrote:



 On 10 Set, 11:16, WebbedIT p...@webbedit.co.uk wrote:
 How do you know if this is a security component issue as the form is
 not being submitted to a Controller/Action to be processed?!?

 Because if I don't use the Security component the form is correctly
 submit.

 What should happen if the form submits to the url /test/?
 It doesn't anything.Simply it reloads the page.
 


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread byqsri

I try to set the debug mode to 1 and to 2 but there is no errors

On 10 Set, 11:37, Bert Van den Brande cyr...@gmail.com wrote:
 A clean white page suggests an error that can't be shown because you
 have set the debug level to 0.

 Try setting it to 1 or 2 and see if the 'white page' now outputs an
 error message.

 On Thu, Sep 10, 2009 at 11:32 AM, byqsri marco.rizze...@gmail.com wrote:

  On 10 Set, 11:16, WebbedIT p...@webbedit.co.uk wrote:
  How do you know if this is a security component issue as the form is
  not being submitted to a Controller/Action to be processed?!?

  Because if I don't use the Security component the form is correctly
  submit.

  What should happen if the form submits to the url /test/?
  It doesn't anything.Simply it reloads the page.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread Bert Van den Brande

What's the url of the page with the form, and what's the url of the white page ?

Maybe inspect traffic with the FireFox plugin Tamper Data to detect
what's going on ...

On Thu, Sep 10, 2009 at 11:46 AM, byqsri marco.rizze...@gmail.com wrote:

 I try to set the debug mode to 1 and to 2 but there is no errors

 On 10 Set, 11:37, Bert Van den Brande cyr...@gmail.com wrote:
 A clean white page suggests an error that can't be shown because you
 have set the debug level to 0.

 Try setting it to 1 or 2 and see if the 'white page' now outputs an
 error message.

 On Thu, Sep 10, 2009 at 11:32 AM, byqsri marco.rizze...@gmail.com wrote:

  On 10 Set, 11:16, WebbedIT p...@webbedit.co.uk wrote:
  How do you know if this is a security component issue as the form is
  not being submitted to a Controller/Action to be processed?!?

  Because if I don't use the Security component the form is correctly
  submit.

  What should happen if the form submits to the url /test/?
  It doesn't anything.Simply it reloads the page.


 


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread byqsri

The url is the same.
With FireFox plugin Tamper Data I get status header  Not Found - 404

On 10 Set, 12:14, Bert Van den Brande cyr...@gmail.com wrote:
 What's the url of the page with the form, and what's the url of the white 
 page ?

 Maybe inspect traffic with the FireFox plugin Tamper Data to detect
 what's going on ...

 On Thu, Sep 10, 2009 at 11:46 AM, byqsri marco.rizze...@gmail.com wrote:

  I try to set the debug mode to 1 and to 2 but there is no errors

  On 10 Set, 11:37, Bert Van den Brande cyr...@gmail.com wrote:
  A clean white page suggests an error that can't be shown because you
  have set the debug level to 0.

  Try setting it to 1 or 2 and see if the 'white page' now outputs an
  error message.

  On Thu, Sep 10, 2009 at 11:32 AM, byqsri marco.rizze...@gmail.com wrote:

   On 10 Set, 11:16, WebbedIT p...@webbedit.co.uk wrote:
   How do you know if this is a security component issue as the form is
   not being submitted to a Controller/Action to be processed?!?

   Because if I don't use the Security component the form is correctly
   submit.

   What should happen if the form submits to the url /test/?
   It doesn't anything.Simply it reloads the page.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread Martin Westin

I don't think is affects your problem but in the code you posted the
html would be invalid. The form and /form should be at the same
hierarchical leven in the html but you have the end inside a div.

A 404 is what you would get is SecurityComponent decided to kick you
in the behind. It is called blackHole() and is the end of the road for
any bad request. You can specify blackHoleCallback on the component
(in the beforeFilter of your controller) and name one method in your
controller as the callback. This method will then receive the error
and giving you the opportunity to debug what is going on.

$this-Security-blackHoleCallback = 'some_method_name';

Or you can open the Security Component directly and insert a debug in
blackHole... if you prefer that.




On Sep 10, 12:39 pm, byqsri marco.rizze...@gmail.com wrote:
 The url is the same.
 With FireFox plugin Tamper Data I get status header  Not Found - 404

 On 10 Set, 12:14, Bert Van den Brande cyr...@gmail.com wrote:



  What's the url of the page with the form, and what's the url of the white 
  page ?

  Maybe inspect traffic with the FireFox plugin Tamper Data to detect
  what's going on ...

  On Thu, Sep 10, 2009 at 11:46 AM, byqsri marco.rizze...@gmail.com wrote:

   I try to set the debug mode to 1 and to 2 but there is no errors

   On 10 Set, 11:37, Bert Van den Brande cyr...@gmail.com wrote:
   A clean white page suggests an error that can't be shown because you
   have set the debug level to 0.

   Try setting it to 1 or 2 and see if the 'white page' now outputs an
   error message.

   On Thu, Sep 10, 2009 at 11:32 AM, byqsri marco.rizze...@gmail.com 
   wrote:

On 10 Set, 11:16, WebbedIT p...@webbedit.co.uk wrote:
How do you know if this is a security component issue as the form is
not being submitted to a Controller/Action to be processed?!?

Because if I don't use the Security component the form is correctly
submit.

What should happen if the form submits to the url /test/?
It doesn't anything.Simply it reloads the page.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with Security component and form submit

2009-09-10 Thread Miles J

Add this to your controllers beforeFilter:

$this-Security-disabledFields = array('testValue');

http://www.milesj.me/blog/read/43/Protecting-Your-Forms-With-The-Security-Component
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---