zitadel/zitadel#6196
The implementation and test do not properly handle version differences.
The test itself is flawed due to not creating a new hash instead using a static hash.
This causes issues when trying to log in after the account was imported with an old password hash on a separate version.
Lets say user tries to log in using $2y, the verifier will first use passwap to extract the cost and salt, not the version
Then the verifier creates a new hash using the extracted paramaters, because no version is passed it will create a $2a.
Then these two are compared and ultimately fail the check even though the password is valid, causing the user to be unable to log in, and no passwap ends up happening.
This issue is self assigned to @veryCrunchy
zitadel/zitadel#6196
The implementation and test do not properly handle version differences.
The test itself is flawed due to not creating a new hash instead using a static hash.
This causes issues when trying to log in after the account was imported with an old password hash on a separate version.
Lets say user tries to log in using
This issue is self assigned to @veryCrunchy$2y, the verifier will first use passwap to extract the cost and salt, not the versionThen the verifier creates a new hash using the extracted paramaters, because no version is passed it will create a
$2a.Then these two are compared and ultimately fail the check even though the password is valid, causing the user to be unable to log in, and no passwap ends up happening.