aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2023-08-15 14:29:07 +0200
committerMiquel Lionel <lionel@les-miquelots.net>2023-08-15 15:14:03 +0200
commit75d29bd6d772bf693c2f24b1db8fe4b8f3597cf0 (patch)
tree9f56e3d3b725b813a1beec289360ad985dd75d67
parentbc5a1d35cbf5c1aca406fa0fe81ca60d6b280bd5 (diff)
downloaddino-75d29bd6d772bf693c2f24b1db8fe4b8f3597cf0.tar.gz
dino-75d29bd6d772bf693c2f24b1db8fe4b8f3597cf0.zip
Obfuscate password length in account dialog (fixes #797)
-rw-r--r--main/src/ui/manage_accounts/dialog.vala9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala
index a326aeff..fb226702 100644
--- a/main/src/ui/manage_accounts/dialog.vala
+++ b/main/src/ui/manage_accounts/dialog.vala
@@ -43,7 +43,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;
+ }
+ });
Util.LabelHybridGroup label_hybrid_group = new Util.LabelHybridGroup();
label_hybrid_group.add(alias_hybrid);
@@ -65,6 +69,7 @@ public class Dialog : Gtk.Dialog {
settings_list.attach(widget, 1, row_index, 2);
row_index++;
+ password_hybrid.text = "************";
}
}
@@ -191,7 +196,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);