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

Laravel 10.10 - Cast password "hashed" #479

Closed
Grazulex opened this issue Jul 31, 2023 · 3 comments · Fixed by laravel/framework#47904
Closed

Laravel 10.10 - Cast password "hashed" #479

Grazulex opened this issue Jul 31, 2023 · 3 comments · Fixed by laravel/framework#47904

Comments

@Grazulex
Copy link

Hello,
From the Laravel 10.10 version, we can cast a password directly in the model with "hashed" so we don't need anymore to hashed this password in the code.
Do you think that we will change our code to take this feature in consideration ?

Now, each time when I instal or upgrade Fortify, I need to change the code again to avoid a dubble hashing of the password :-)

Thanks

crynobone added a commit to laravel/framework that referenced this issue Jul 31, 2023
Verify reported issue: laravel/fortify#479

Signed-off-by: Mior Muhammad Zaki <[email protected]>
@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. From our own tests, this is not possible laravel/framework#47904

Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

@laserhybiz
Copy link

Why do think the password is being hashed twice? when casting to hashed we first check if the password is already hashed see here: https://github.com/laravel/framework/blob/10.x/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php#L1319

@crynobone
Copy link
Member

the line you shown check if value hasn't been hashed and in that case should be hashed..

taylorotwell pushed a commit to laravel/framework that referenced this issue Jul 31, 2023
* [10.x] Test Improvements for `hashed` password

Verify reported issue: laravel/fortify#479

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
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