Regards
2009/6/27 Justin Poliey <jdp34@njit.edu>
That's where I got the information I'm using now. The problem is if I
just change the hash function with Security::setHash, Cake will still
apply the salt before it hashes the passwords, so the hashes will
still be incompatible.
Thanks
Justin
On Jun 27, 7:06 am, John Andersen <j.andersen...@gmail.com> wrote:
> I understand that you are using MD5 instead of SHA1 in your user
> model!
>
> If that is the final decision, then why don't you just tell CakePHP to
> use MD5 as default and as shown in the example at:
>
> http://book.cakephp.org/view/566/Change-Hash-Function
>
> Maybe that would help you!
> Enjoy,
> John
>
> On Jun 27, 10:37 am, Justin Poliey <jd...@njit.edu> wrote:
>
> > Right now I'm using Cake's Auth component to build a simple user
> > system. Pastes of the files in their entirety are availablehttp://gist.github.com/136935forreference.
>
> > The problem is that when I call: $this->Auth->authenticate =
> > ClassRegistry::init('User'), login.ctp always shows "Login failed.
> > Invalid username or password." even when I haven't submitted anything.
> > If I uncomment that line (line 10, users_controller.php) the message
> > is suppressed but the login logic doesn't work, because it needs the
> > hashedPasswords function in the User model to get the proper password
> > hash. We need to use plain md5 hashes instead of Cake's regular hash
> > because before converting to Cake all of our users just had plain md5
> > hashed passwords.
>
> > The strangest thing is that this happened before, and was solved by
> > getting rid of all the relevant code, and then completely rewriting
> > it. After the rewrite, it worked for a while, and then I must have
> > done something to break it again. Can anyone see what is wrong? Am I
> > doing something dumb and just not realizing it?
>
> > Thanks for any help.
>
>
--~--~---------~--~----~------------~-------~--~----~
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