Home  >  Q&A  >  body text

Brother Zhu, the password in your video is encrypted with SHA1 and you can’t log in.

This is in your video, you can’t log in

$map []=['email','=',$data['email']];
$map [] =['password','=',sha1($data['password'])];
$resilt=UserModel::where($map)->find();

I I logged in after deleting sha1. Why?

$map []=['email','=',$data['email']];
$map []= ['password','=',$data['password']];
$resilt=UserModel::where($map)->find();

张兴富_飞鹰张兴富_飞鹰2303 days ago1262

reply all(2)I'll reply

  • You bad bad

    You bad bad2018-07-18 15:57:30

    It means there is no encryption in the registration method, or the encryption is wrong. Open the user table corresponding to the database and look at this data, and you will understand everything

    reply
    0
  • 无忌哥哥

    无忌哥哥2018-07-18 13:38:12

    Are the passwords stored in the database also sha1? If one is sha1 and the other is not during password verification, the verification will not pass.

    reply
    0
  • Cancelreply