mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-18 15:47:57 +01:00
relax password requirements during registration and change password
This commit is contained in:
parent
0fb2349a8e
commit
440032ed4a
@ -13,11 +13,8 @@ angular
|
||||
$scope.register = function (form) {
|
||||
var error = false;
|
||||
|
||||
if ($scope.model.masterPassword.length < 8 || !/[a-z]/i.test($scope.model.masterPassword) ||
|
||||
/^[a-zA-Z]*$/.test($scope.model.masterPassword)) {
|
||||
validationService.addError(form, 'MasterPassword',
|
||||
'Master password must be at least 8 characters long and contain at least 1 letter and 1 number ' +
|
||||
'or special character.', true);
|
||||
if ($scope.model.masterPassword.length < 8) {
|
||||
validationService.addError(form, 'MasterPassword', 'Master password must be at least 8 characters long.', true);
|
||||
error = true;
|
||||
}
|
||||
if ($scope.model.masterPassword !== $scope.model.confirmMasterPassword) {
|
||||
|
@ -7,11 +7,9 @@
|
||||
$scope.save = function (model, form) {
|
||||
var error = false;
|
||||
|
||||
if ($scope.model.newMasterPassword.length < 8 || !/[a-z]/i.test($scope.model.newMasterPassword) ||
|
||||
/^[a-zA-Z]*$/.test($scope.model.newMasterPassword)) {
|
||||
if ($scope.model.newMasterPassword.length < 8) {
|
||||
validationService.addError(form, 'NewMasterPasswordHash',
|
||||
'Master password must be at least 8 characters long and contain at least 1 letter and 1 number ' +
|
||||
'or special character.', true);
|
||||
'Master password must be at least 8 characters long.', true);
|
||||
error = true;
|
||||
}
|
||||
if ($scope.model.newMasterPassword !== $scope.model.confirmNewMasterPassword) {
|
||||
|
Loading…
Reference in New Issue
Block a user