v.24.6Improvement

Add validation for user creation with bcrypt_hash

Add a validation when creating a user with bcrypt_hash. #65242 (Raúl Marín).
Added validation for bcrypt_hash when creating a user to ensure correctness and security of the password hash format.

Why it matters

This feature addresses the problem of invalid or malformed bcrypt_hash values being accepted during user creation, which could lead to authentication issues or security vulnerabilities. By validating the bcrypt_hash, it ensures that only properly formatted hashes are allowed, improving overall system security and reliability.

How to use it

When creating a user with a bcrypt_hash, the system now automatically validates the hash format. Users simply need to provide a valid bcrypt_hash in the user creation statement, and the validation will be enforced transparently.