diff --git a/setup/pub/magento/setup/create-admin-account.js b/setup/pub/magento/setup/create-admin-account.js index 423ef0a341f8e86db3bc7c91e2427725054c2f10..ecd31b3459fa1535bf70cac879818382444000b5 100644 --- a/setup/pub/magento/setup/create-admin-account.js +++ b/setup/pub/magento/setup/create-admin-account.js @@ -18,16 +18,17 @@ angular.module('create-admin-account', ['ngStorage']) return; } var p = $scope.admin.password; - if (p.length >= 6 && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/) && p.match(/[!@#$%^*()_\/\\\-\+=]+/)) { + var MIN_ADMIN_PASSWORD_LENGTH = 7; + if (p.length >= MIN_ADMIN_PASSWORD_LENGTH && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/) && p.match(/[!@#$%^*()_\/\\\-\+=]+/)) { $scope.admin.passwordStatus.class = 'strong'; $scope.admin.passwordStatus.label = 'Strong'; - } else if (p.length >= 6 && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/)) { + } else if (p.length >= MIN_ADMIN_PASSWORD_LENGTH && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/)) { $scope.admin.passwordStatus.class = 'good'; $scope.admin.passwordStatus.label = 'Good'; - } else if (p.length >= 6 && p.match(/[\d]+/) && p.match(/[a-zA-Z]+/)) { + } else if (p.length >= MIN_ADMIN_PASSWORD_LENGTH && p.match(/[\d]+/) && p.match(/[a-zA-Z]+/)) { $scope.admin.passwordStatus.class = 'fair'; $scope.admin.passwordStatus.label = 'Fair'; - } else if (p.length >= 6) { + } else if (p.length >= MIN_ADMIN_PASSWORD_LENGTH) { $scope.admin.passwordStatus.class = 'weak'; $scope.admin.passwordStatus.label = 'Weak'; } else { diff --git a/setup/view/magento/setup/create-admin-account.phtml b/setup/view/magento/setup/create-admin-account.phtml index 379974ec0c6698b8d8641ff73f4f0cc377ee9b80..fa58a132d6de365ea907f8abc44a3c39b8bac666 100644 --- a/setup/view/magento/setup/create-admin-account.phtml +++ b/setup/view/magento/setup/create-admin-account.phtml @@ -19,7 +19,7 @@ $passwordWizard = sprintf( </div> <p>%s</p>', 'Password Strength:', - 'Enter a mix of 6 or more numbers and letters. For a stronger password, include at least one small letter, big letter, and symbol (Ex: BuyIt$54).' + 'Enter a mix of 7 or more numbers and letters. For a stronger password, include at least one small letter, big letter, and symbol (Ex: BuyIt$54).' ); ?> @@ -146,7 +146,7 @@ $passwordWizard = sprintf( > <div class="error-container"> <span ng-show="account.adminPassword.$error.checkPassword"> - Please enter a mix of at least 6 alpha-numeric characters. + Please enter a mix of at least 7 alpha-numeric characters. </span> <span ng-show="account.adminPassword.$error.required"> Please enter your new password.