Sunday, November 30, 2008

RC3 Auth: Hash value still being generated for empty password textbox?

I have an "Add User" form that submits a username and a password.
When I try to submit an empty username and password field then log it
in the "Users" controller (Auth component is used in
app_controller.php), the username value is returned as blank, but the
password value returns "ea03a66b50513f5710cb2507d7c91daecfefdab7" (may
be dependent on my security.salt):

[User] => Array
(
[username] =>
[password] => ea03a66b50513f5710cb2507d7c91daecfefdab7
)

I expect that no hash value would be generated since I left the
password field empty.
Also, would it be possible to validate the password length (without
using javascript) before Auth generates a hash value for it? Right now
I have a validation for "minimum length >=8", but that would always
return true since the hash value is always more than 8 characters
long.

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