简体   繁体   English

我在cakephp 2.4中陷入了登录页面

[英]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. 我在cakephp 2.4中陷入了登录页面,有人可以帮我弄清楚我犯了什么错误。 Thank you so much! 非常感谢! (why did I dont see the password in WHERE clause of the query??) (为什么我在查询的WHERE子句中看不到密码?)

Here is sql file, the project file and two pictures describe the problem: 这是sql文件,项目文件和两个图片描述了问题:

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

  • Project file: dropbox.com/s/kextdrpzizyskwd/chickenrainshop.zip?dl=0 项目文件: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). 您不会在WHERE子句中看到password列,因为Cakes身份验证层使用配置的密码哈希器在PHP级别比较密码,默认情况下,该哈希器是SimplePasswordHasher (至少在CakePHP 2.x中),使用sha1sha256md5 ,具体取决于系统上的可用资源(按此顺序,并且在任何情况下都与Security.salt配置值一起使用)。

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. 数据库中的密码值很可能都是错误的,第一个看起来像md5 ,它不太可能被您的应用程序使用,第二个是纯字符串,将永远无法使用。

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 也可以看看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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