🔒 Adds password verify check to cloud sync

This commit is contained in:
Alicia Sykes 2021-08-08 18:38:35 +01:00
parent e5227fb2d7
commit aa89a5b27e
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,9 @@ export default {
},
checkPass() {
const savedHash = localStorage[localStorageKeys.BACKUP_HASH] || undefined;
if (!savedHash) {
if (!this.backupPassword) {
this.showErrorMsg(this.$t('cloud-sync.backup-missing-password'));
} else if (!savedHash) {
this.makeBackup();
} else if (savedHash === this.makeHash(this.backupPassword)) {
this.makeUpdate();