Skip to content

Make length-validation configurable for admin password creation #333

Open
@oehmiche

Description

@oehmiche

Hello,

for customer accounts the minimal length of a password is configurable in the admin UI (see Stores > Configuration > Customers > Customer Configuration)
customer-length-validation
For admin users this validation is hardcoded in the javascript code (see vendor/magento/magento2-base/lib/web/mage/validation.js):

       'validate-admin-password': [
            function (v) {
 ...
                if (pass.length < 7) {
                    return false;
                }
...
            },
            $.mage.__('Please enter 7 or more characters, using both numeric and alphabetic.')
        ],

Nowadays 7 characters isn't desirable for the minimal length of a password (especially for an admin). So we needed to provide a fix (through m2-hotfixes) to increase this number.
I would like to be able to specify the minimum number of characters in the admin ui (e.g. via Stores > Configuration > Advanced > Admin > Security).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions