-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CustomerComponent: Framework/DBUSE ONLY for FRAMEWORK RELATED BUG!USE ONLY for FRAMEWORK RELATED BUG!Fixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions (*)
- PHP 7.2.19 where you have the sodium extension installed, and have libsodium >= 1.0.13 (this is very important!)
Steps to reproduce (*)
- Have Magento 2.3.1 installed
- Create 2 customers in the frontend, remember their passwords
- Look into the database to the
password_hash
column in thecustomer_entity
table, they look something like this:{64-random-chars}:{32-random-chars}:1
Screen1 - Upgrade to Magento 2.3.2
- Login with the first customer in the frontend
- Look at the database again, his
password_hash
has changed to:{64-random-chars}:{16-random-chars}:2
Screen2 - Logout and log back in with the first customer, notice that this works => good
- Now, assume you can't wait on every customer to login to upgrade their password hash and just do it yourself by running
bin/magento customer:hash:upgrade
- Look at the database again, the
password_hash
for the second customer has changed to:{64-random-chars}:{32-random-chars}:1:2
Screen3 - Now try to login with the second customer on the frontend, this does not work => not good
Expected result (*)
- It is expected to be able to login with a customer after you ran
bin/magento customer:hash:upgrade
Actual result (*)
- You can't login with a customer after you ran
bin/magento customer:hash:upgrade
Discussion
I assume executing bin/magento customer:hash:upgrade
upgrades the password_hash
to the new algorithm, but not by using the unhashed password, because it can't know it. Then on the next login of that particular customer, it should detect this because the hash ends with :1:2
and then again re-hash it and change it to just :2
.
But that doesn't seem to be working here for some reason.
Watch out: I have no idea if this is actually how Magento wanted to implement this, but this makes sense. Unfortunately there seems to be something broken in the implementation.
Swahjak
Metadata
Metadata
Labels
Component: CustomerComponent: Framework/DBUSE ONLY for FRAMEWORK RELATED BUG!USE ONLY for FRAMEWORK RELATED BUG!Fixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release