Skip to content

Commit

Permalink
Obfuscate password length (#64)
Browse files Browse the repository at this point in the history
* Add null checks in password_hybrid.changed.connect signal
* Obfuscate password length in account dialog (fixes dino#797)

Co-authored-by: Miquel Lionel <[email protected]>
  • Loading branch information
2 people authored and mxlgv committed Apr 24, 2024
1 parent 29355ba commit 2ecd993
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main/src/ui/manage_accounts/dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public class Dialog : Gtk.Dialog {
});
image_button.clicked.connect(show_select_avatar);
alias_hybrid.entry.changed.connect(() => { selected_account.alias = alias_hybrid.text; });
password_hybrid.entry.changed.connect(() => { selected_account.password = password_hybrid.text; });
password_hybrid.entry.changed.connect(() => {
if (password_hybrid.text != "************") {
selected_account.password = password_hybrid.text;
}
});
password_change_btn.clicked.connect(show_change_psswd_dialog);

Util.LabelHybridGroup label_hybrid_group = new Util.LabelHybridGroup();
Expand All @@ -68,6 +72,7 @@ public class Dialog : Gtk.Dialog {

settings_list.attach(widget, 1, row_index, 2);
row_index++;
password_hybrid.text = "************";
}
}

Expand Down Expand Up @@ -200,7 +205,7 @@ public class Dialog : Gtk.Dialog {

alias_hybrid.text = account.alias ?? "";
password_hybrid.entry.input_purpose = InputPurpose.PASSWORD;
password_hybrid.text = account.password;


update_status_label(account);

Expand Down

0 comments on commit 2ecd993

Please sign in to comment.