简体   繁体   中英

I'm getting stuck with login page in cakephp 2.4

I'm getting stuck with login page in cakephp 2.4, can anyone help me figure it out what mistakes I have made. Thank you so much! (why did I dont see the password in WHERE clause of the query??)

Here is sql file, the project file and two pictures describe the problem:

  • SQL file: dropbox.com/s/b4pv419j09rp5jk/chickenrainshop.sql?dl=0

  • Project file: dropbox.com/s/kextdrpzizyskwd/chickenrainshop.zip?dl=0

在此处输入图片说明

在此处输入图片说明

You're not seeing the password column in the WHERE clause because Cakes authentication layer compares passwords at PHP level, using the configured password hasher, which by default is SimplePasswordHasher (at least in CakePHP 2.x), using sha1 , sha256 , or md5 , depending on what's available on the system (in that order, and in any case salted with the Security.salt config value).

The password values in your database are most probably both wrong, the first one looks like md5 , which is unlikely to be used by your app, and the second one is a plain string, which will never work.

So as already hinted in the comments, update your database with the correct password hashes. Ideally add the users to your database via your app.

See also

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM