Skip to content

Commit df4942d

Browse files
author
Olga Kopylova
committed
MAGETWO-33443: Password strength validator on installation wizard works in over-exacting mode
- fixed conditions and message for password strength
1 parent c7d50ab commit df4942d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

setup/module/Magento/Setup/styles/components/tooltips/_password-strength.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
&.password-strength-weak {
1818
.password-strength-item:first-child,
1919
.password-strength-item:first-child + .password-strength-item {
20-
background-color: @color-warning;
20+
background-color: @color-failed;
2121
}
2222
}
2323
&.password-strength-fair {

setup/pub/magento/setup/create-admin-account.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ angular.module('create-admin-account', ['ngStorage'])
1818
return;
1919
}
2020
var p = $scope.admin.password;
21-
if (p.length > 6 && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/) && p.match(/[!@#$%^*()_\/\\\-\+=]+/)) {
21+
if (p.length >= 6 && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/) && p.match(/[!@#$%^*()_\/\\\-\+=]+/)) {
2222
$scope.admin.passwordStatus.class = 'strong';
2323
$scope.admin.passwordStatus.label = 'Strong';
24-
} else if (p.length > 6 && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/)) {
24+
} else if (p.length >= 6 && p.match(/[\d]+/) && p.match(/[a-z]+/) && p.match(/[A-Z]+/)) {
2525
$scope.admin.passwordStatus.class = 'good';
2626
$scope.admin.passwordStatus.label = 'Good';
27-
} else if (p.length > 6 && p.match(/[\d]+/) && p.match(/[a-zA-Z]+/)) {
27+
} else if (p.length >= 6 && p.match(/[\d]+/) && p.match(/[a-zA-Z]+/)) {
2828
$scope.admin.passwordStatus.class = 'fair';
2929
$scope.admin.passwordStatus.label = 'Fair';
3030
} else if (p.length >= 6) {

setup/pub/magento/setup/css/setup.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

setup/view/magento/setup/create-admin-account.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $passwordWizard = sprintf(
1616
</div>
1717
<p>%s</p>',
1818
'Password Strength:',
19-
'Enter 6 or more characters. For a strong password, use a mix of numbers, symbols, and uppercase and lowercase letters (Ex: BuyIt$54).'
19+
'Enter a mix of at least 6 alpha-numeric characters. For a strong password, use numbers, symbols, uppercase and lowercase letters (Ex: BuyIt$54).'
2020
);
2121
?>
2222

0 commit comments

Comments
 (0)