password must not contain null character

Created on 11 September 2024, 2 months ago

Problem/Motivation

If the call to random_bytes returns a result that contains a null byte character, the following error is returned:

"Bcrypt password must not contain null character in password_hash() (line 37 of /core/lib/Drupal/Core/Password/PhpPassword.php)."

Steps to reproduce

This is difficult to reproduce, as you would need to repeat the process of creating a user through saml_authenticate until the generator actually returned a NULL character.

Proposed resolution

We can resolve this by transforming the byte string into a hex string.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States TomTech

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024