Re: Does Auth automatic hash work only with specific actions?
On Feb 5, 11:14 am, Dardo Sordi Bogado wrote: > Hint: Are you including the username field? > Yep. Initially I did not, but to do the latest test I used the same view for both actions, so to have the same data posted. The debug in fact looks the same a part from the password field that in one case is not hashed. I'm 99% sure that is something stupid I'm doing wrong somewhere, but I can't figure out what it is. Anyway now it's just a matter of couriosity, cause I found out it's better not to have it hashed in that particular action. Andrea --~--~-~--~~~---~--~~ 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: Does Auth automatic hash work only with specific actions?
Hint: Are you including the username field? On Wed, Feb 4, 2009 at 11:34 AM, Mirthis wrote: > > Yes that was a typo. Both the actions are in the User controller, and > Auth is enabled for all actions of the controller, through the > beforefilter method. > As soon as I can I'll do a further check to the $this->data array > printed by the debug function to verify that it matches the structure > you wrote but as the views are the same I think ther'e no difference > between them otherwise I should have the same problem (no hash) in the > register action too. > > On Feb 4, 12:06 pm, Martin Westin wrote: >> Auth should hash the password anywhere. >> It looks for $this->data['User']['password'] (or whatever you have >> changed it to) on every request. >> It will not hash $this->data[0]['User']['password'] for example. >> >> You wrote "resetPassword controller". A typo right? Otherwise check >> that Auth is included in that controller or globally. >> >> I can't think of anything else that might cause this problem. >> >> On Feb 3, 9:30 pm, Andrea Cardinale wrote: >> >> > Hi guys, I really hope the answer to my question is yes, otherwise I >> > can't understand what's going on. >> > I have this two dummy functions in my user controller >> >> > function register() { >> > debug($this->data); >> > } >> >> > function resetPassword($ticket=null) { >> > debug($this->data); >> > } >> >> > I build a view with a password field for both. The views are identical >> > a part from this line >> > create('User', array('action' => 'register'));?> >> > create('User', array('action' => 'resetPassword'));?> >> >> > So when I post the form from the register action the password in the >> > debug message appear hashed when I post from the resetPassword >> > controller it is not >> > I just want to know either that I'm right or that I'm doing something >> > wrong, what it matters is that I'm not getting crazy ;D >> >> > Andrea > > > --~--~-~--~~~---~--~~ 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: Does Auth automatic hash work only with specific actions?
Yes that was a typo. Both the actions are in the User controller, and Auth is enabled for all actions of the controller, through the beforefilter method. As soon as I can I'll do a further check to the $this->data array printed by the debug function to verify that it matches the structure you wrote but as the views are the same I think ther'e no difference between them otherwise I should have the same problem (no hash) in the register action too. On Feb 4, 12:06 pm, Martin Westin wrote: > Auth should hash the password anywhere. > It looks for $this->data['User']['password'] (or whatever you have > changed it to) on every request. > It will not hash $this->data[0]['User']['password'] for example. > > You wrote "resetPassword controller". A typo right? Otherwise check > that Auth is included in that controller or globally. > > I can't think of anything else that might cause this problem. > > On Feb 3, 9:30 pm, Andrea Cardinale wrote: > > > Hi guys, I really hope the answer to my question is yes, otherwise I > > can't understand what's going on. > > I have this two dummy functions in my user controller > > > function register() { > > debug($this->data); > > } > > > function resetPassword($ticket=null) { > > debug($this->data); > > } > > > I build a view with a password field for both. The views are identical > > a part from this line > > create('User', array('action' => 'register'));?> > > create('User', array('action' => 'resetPassword'));?> > > > So when I post the form from the register action the password in the > > debug message appear hashed when I post from the resetPassword > > controller it is not > > I just want to know either that I'm right or that I'm doing something > > wrong, what it matters is that I'm not getting crazy ;D > > > Andrea --~--~-~--~~~---~--~~ 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: Does Auth automatic hash work only with specific actions?
Auth should hash the password anywhere. It looks for $this->data['User']['password'] (or whatever you have changed it to) on every request. It will not hash $this->data[0]['User']['password'] for example. You wrote "resetPassword controller". A typo right? Otherwise check that Auth is included in that controller or globally. I can't think of anything else that might cause this problem. On Feb 3, 9:30 pm, Andrea Cardinale wrote: > Hi guys, I really hope the answer to my question is yes, otherwise I > can't understand what's going on. > I have this two dummy functions in my user controller > > function register() { > debug($this->data); > } > > function resetPassword($ticket=null) { > debug($this->data); > } > > I build a view with a password field for both. The views are identical > a part from this line > create('User', array('action' => 'register'));?> > create('User', array('action' => 'resetPassword'));?> > > So when I post the form from the register action the password in the > debug message appear hashed when I post from the resetPassword > controller it is not > I just want to know either that I'm right or that I'm doing something > wrong, what it matters is that I'm not getting crazy ;D > > Andrea --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Does Auth automatic hash work only with specific actions?
Hi guys, I really hope the answer to my question is yes, otherwise I can't understand what's going on. I have this two dummy functions in my user controller function register() { debug($this->data); } function resetPassword($ticket=null) { debug($this->data); } I build a view with a password field for both. The views are identical a part from this line create('User', array('action' => 'register'));?> create('User', array('action' => 'resetPassword'));?> So when I post the form from the register action the password in the debug message appear hashed when I post from the resetPassword controller it is not I just want to know either that I'm right or that I'm doing something wrong, what it matters is that I'm not getting crazy ;D Andrea --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---