runlinenl / nova-profile-tool

This package adds a tool for Laravel nova to let a user manage their profile data
MIT License
37 stars 40 forks source link

Bug: Not able to login in after hit update #3

Open dominikgeimer opened 6 years ago

dominikgeimer commented 6 years ago

Hello,

I think I found a bug. If you go to your Profile and just hit update without changing anything and you log out, you are not able to login again because it says "These credentials do not match our records. "

Greets Dominik

patrickbergman commented 5 years ago

Hi,

Sorry for the late reply, Currently the package is using bcrypt to encrypt the password when it is submitted. Do you use another type of encrypting? And do you know of any method of laravel that takes the configured encryption?

Sagital commented 5 years ago

I think the problem is that is assumes that you always want to change the password even if you just want to change your name. So if you don't type anything in the password field it will reset your password to an unknown (empty) value. This should probably be fixed to check if the password is empty

estaticfear commented 5 years ago

I think the problem is that is assumes that you always want to change the password even if you just want to change your name. So if you don't type anything in the password field it will reset your password to an unknown (empty) value. This should probably be fixed to check if the password is empty

You are right, please fix it.

OmarHrra commented 4 years ago

Same problem

MiltonD29 commented 4 years ago

Same problem...

Gummibeer commented 4 years ago

The problem is that request()->has('password') is always true. So it crypts null that changes the password hash in the DB.

JeasonZuo commented 4 years ago

You can add this function into User model to fix this issue

public function setPasswordAttribute($value) {
    if (!Hash::check(null, $value)) {
        $this->attributes['password'] = $value;
    }
}