Skip to content
Snippets Groups Projects
Commit ecb8c23e authored by Maddy Chellathurai's avatar Maddy Chellathurai
Browse files

Merge remote-tracking branch 'ogresCE/MAGETWO-43904-password-length' into PR_Branch

parents 1af61324 01442907
Branches
No related merge requests found
......@@ -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 {
......
......@@ -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.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment