magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Make length-validation configurable for admin password creation #333

Open oehmiche opened 2 years ago

oehmiche commented 2 years ago

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).

m2-assistant[bot] commented 2 years ago

Hi @oehmiche. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this