Skip to content

Add the ability to import SHA-1 pre-hashed passwords #69

@veryCrunchy

Description

@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 $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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Gathering community feedback

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions