fix #1295, fix #1353: displaying passwords as protected fields regardless of settings in the file

This commit is contained in:
antelle 2020-03-21 15:54:12 +01:00
parent 0712c9f24b
commit 905d09899c
2 changed files with 10 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class EntryModel extends Model {
this.fileName = this.file.name;
this.groupName = this.group.title;
this.title = this._getFieldString('Title');
this.password = entry.fields.Password || kdbxweb.ProtectedValue.fromString('');
this.password = this._getPassword();
this.notes = this._getFieldString('Notes');
this.url = this._getFieldString('URL');
this.displayUrl = this._getDisplayUrl(this._getFieldString('URL'));
@ -71,6 +71,14 @@ class EntryModel extends Model {
}
}
_getPassword() {
const password = this.entry.fields.Password || kdbxweb.ProtectedValue.fromString('');
if (!password.isProtected) {
return kdbxweb.ProtectedValue.fromString(password);
}
return password;
}
_getFieldString(field) {
const val = this.entry.fields[field];
if (!val) {

View File

@ -33,6 +33,7 @@ Release notes
`-` fix #1338: minimized option not working on linux
`-` fix #895: generator positioning in list view
`-` fix #516: scrolling on the open screen on mobile
`-` fix #1295, #1353: displaying passwords as protected fields regardless of settings in the file
##### v1.12.3 (2019-11-06)
`-` fix #1335: removed the menubar on Windows and Linux