Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly added 'hashed' cast may be incorrect. #47028

Closed
nshiro opened this issue May 11, 2023 · 2 comments · Fixed by #47029
Closed

Newly added 'hashed' cast may be incorrect. #47028

nshiro opened this issue May 11, 2023 · 2 comments · Fixed by #47029

Comments

@nshiro
Copy link
Contributor

nshiro commented May 11, 2023

Laravel Version

10.10.0

PHP Version

8.2

Database Driver & Version

No response

Description

Newly added hashed cast may have been implemented incorrectly.
#46947

As I understand it, Hash::needsRehash() is supposed to take a hashed string as an argument.
https://laravel.com/docs/10.x/hashing
https://www.php.net/manual/en/function.password-needs-rehash

And an already hashed string will be double-hashed if it needs rehashing.

Steps To Reproduce

$user->password = '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi';
$user->save();
@driesvints
Copy link
Member

Ping @gdebrauwer

@gdebrauwer
Copy link
Contributor

I created a PR to fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants