mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-19 15:57:42 +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) {
|
$scope.register = function (form) {
|
||||||
var error = false;
|
var error = false;
|
||||||
|
|
||||||
if ($scope.model.masterPassword.length < 8 || !/[a-z]/i.test($scope.model.masterPassword) ||
|
if ($scope.model.masterPassword.length < 8) {
|
||||||
/^[a-zA-Z]*$/.test($scope.model.masterPassword)) {
|
validationService.addError(form, 'MasterPassword', 'Master password must be at least 8 characters long.', true);
|
||||||
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);
|
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
if ($scope.model.masterPassword !== $scope.model.confirmMasterPassword) {
|
if ($scope.model.masterPassword !== $scope.model.confirmMasterPassword) {
|
||||||
|
@ -7,11 +7,9 @@
|
|||||||
$scope.save = function (model, form) {
|
$scope.save = function (model, form) {
|
||||||
var error = false;
|
var error = false;
|
||||||
|
|
||||||
if ($scope.model.newMasterPassword.length < 8 || !/[a-z]/i.test($scope.model.newMasterPassword) ||
|
if ($scope.model.newMasterPassword.length < 8) {
|
||||||
/^[a-zA-Z]*$/.test($scope.model.newMasterPassword)) {
|
|
||||||
validationService.addError(form, 'NewMasterPasswordHash',
|
validationService.addError(form, 'NewMasterPasswordHash',
|
||||||
'Master password must be at least 8 characters long and contain at least 1 letter and 1 number ' +
|
'Master password must be at least 8 characters long.', true);
|
||||||
'or special character.', true);
|
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
if ($scope.model.newMasterPassword !== $scope.model.confirmNewMasterPassword) {
|
if ($scope.model.newMasterPassword !== $scope.model.confirmNewMasterPassword) {
|
||||||
|
Loading…
Reference in New Issue
Block a user