Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3.04k stars 885 forks source link

use Hash to encrypt password as we use to decrypt #5428

Closed pxpm closed 7 months ago

pxpm commented 7 months ago

WHY

BEFORE - What was wrong? What was happening before this PR?

There was an issue creating users using the console command backpack:user. We were forcely using bcrypt() on the password and then using Hash::verify() that wouldn't be able to match the password given different algorithm options.

AFTER - What is happening after this PR?

It works as expected.

HOW

How did you achieve that, in technical terms?

Replaced the bcrypt() call with a Hash::make() that would use the same configuration used by `Hash::verify().

Is it a breaking change?

I don't think so, no.

How can we test the before & after?

Create a user with php artisan backpack:user.