This commit is contained in:
Mo Bitar
2020-04-01 10:18:43 -05:00
parent 0ac6fd9c23
commit b79c366ee9
5 changed files with 27 additions and 10 deletions

View File

@@ -98,7 +98,15 @@ class PasswordWizardCtrl {
};
const preprocessor = this.preprocessorForStep(this.step);
if (preprocessor) {
await preprocessor().then(next).catch(() => {
await preprocessor().then((success) => {
if(success) {
next();
} else {
this.$timeout(() => {
this.isContinuing = false;
});
}
}).catch(() => {
this.isContinuing = false;
});
} else {
@@ -188,6 +196,15 @@ class PasswordWizardCtrl {
return false;
}
const minLength = this.authManager.getMinPasswordLength();
if (!this.securityUpdate && newPass.length < minLength) {
const message = `Your password must be at least ${minLength} characters in length. For your security, please choose a longer password or, ideally, a passphrase, and try again.`;
this.alertManager.alert({
text: message
});
return false;
}
/** Validate current password */
const authParams = await this.authManager.getAuthParams();
const password = this.formData.currentPassword;
@@ -223,6 +240,7 @@ class PasswordWizardCtrl {
const newUserPassword = this.securityUpdate
? this.formData.currentPassword
: this.formData.newPassword;
const currentServerPw = this.currentServerPw;
const results = await protocolManager.generateInitialKeysAndAuthParamsForUser(
this.authManager.user.email,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "standard-notes-web",
"version": "3.3.3",
"version": "3.3.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -10502,9 +10502,8 @@
}
},
"snjs": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/snjs/-/snjs-1.0.6.tgz",
"integrity": "sha512-JLC3+VYlxzFU3DQ/nOJKBUQOLca4V2AiVP1Al/NEXEQSPaQ4G3f7O25nDMxAlcRceygEPWU/yguYJ/s8PH3rJw==",
"version": "github:standardnotes/snjs#0714da7bbef114173dbb23b5e41b7f705fe4a0cb",
"from": "github:standardnotes/snjs#0714da7bbef114173dbb23b5e41b7f705fe4a0cb",
"dev": true,
"requires": {
"lodash": "^4.17.15"

View File

@@ -1,6 +1,6 @@
{
"name": "standard-notes-web",
"version": "3.3.3",
"version": "3.3.4",
"license": "AGPL-3.0-or-later",
"repository": {
"type": "git",
@@ -47,7 +47,7 @@
"sass-loader": "^8.0.2",
"serve-static": "^1.14.1",
"sn-stylekit": "2.0.22",
"snjs": "1.0.6",
"snjs": "github:standardnotes/snjs#0714da7bbef114173dbb23b5e41b7f705fe4a0cb",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.10.3"