#674, Update fingerprint code to expose password less, remove fingerprint suggestion on password change

This commit is contained in:
Alex Shpak 2019-01-09 22:45:26 +01:00
parent d3d1685785
commit b9ffe62e8b
2 changed files with 4 additions and 5 deletions

View File

@ -211,7 +211,7 @@ const Launcher = {
const encryptConfig = _.extend({}, this.config, {
username: fileId,
password: password
password: password.getText()
});
FingerprintAuth.encrypt(encryptConfig, result => {

View File

@ -164,13 +164,12 @@ const SettingsFileView = Backbone.View.extend({
}
}
const password = this.$el.find('#settings__file-master-pass').val();
const shouldUpdateFingerprint = this.model.get('passwordChanged') && this.model.get('fingerprint'); // save to suggest fingerprint auth after sync
// save to erase old password from fingerprint store after sync
const shouldUpdateFingerprint = this.model.get('passwordChanged') && this.model.get('fingerprint');
this.appModel.syncFile(this.model, arg, () => {
if (shouldUpdateFingerprint) {
this.model.set('fingerprint', null); // erase old fingerprint token
this.appModel.saveFileFingerprint(this.model, password);
this.model.set('fingerprint', null);
}
});
},