Skip to content

Inconsistent validation of password length #27366

Description

@DerIch27

Node Version

22.22.2

Package Manager

npm

Package Manager Version

10.9.4

Strapi Version

5.40.0

Operating System

Linux (Debian/Ubuntu)

Database

PostgreSQL

Javascript or Typescript

Javascript

Bug Description

The maximal length of password fields seems to be checked against the plaintext password on the client side and against the password hash (alwags length 60) on the server side.

Steps to Reproduce

  • create a password field and set maximal length
  • enter a password in content-manager and try to save
  • see the shown warning and check network tab to see wether the warning is caused by the client- or server-side validation
  • repeat with defferent maximal lengths and different password lengths

Expected Behavior

The maximal length is always checked against the plaintext password.

Confirmation Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundsource: core:content-managerSource is core/content-manager packagestatus: pending reproductionWaiting for free time to reproduce the issue, or more informationversion: 5Issue is present in Strapi 5

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions