Improper validation - Password must not contain the username

Created on 22 April 2021, about 3 years ago
Updated 8 April 2024, 3 months ago

Hi,

Using php 8.0 faced with problem of user creation.
Password validation was triggered with message Password must not contain the username when username wasn't used for it at all.

Problem was in strict type policy used in php 8.0 - https://3v4l.org/8J0mr.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine sergei_semipiadniy

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada earthangelconsulting

    something puzzling here: the patch from #10 makes sense, however when it was merged to the main branch for version 4.0.0, a conditional in that patch was left out! this did not make a difference on php7.4 as far as i can tell. however, running version 4.0.0 on php8.1 causes that original error "Password must not contain the username" to occur, for existing users.

    i wrote this simple patch and it seems to have fixed the problem. can someone please verify? The automatic test didn't give an option to test against password_policy 4.0.0 which is what it was designed for.

  • πŸ‡¨πŸ‡¦Canada earthangelconsulting

    apologies, previous post isn't using the naming convention for patches. this one should be.

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    @earthangelconsulting Please open a new issue if this is still a problem and link to this issue. Thanks.

  • Issue was unassigned.
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Unassigning.

Production build 0.69.0 2024