Skip to content

Commit

Permalink
Obfuscate password length in account dialog (fixes dino#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
eerielili authored and Psayker committed Apr 24, 2024
1 parent 7555c8e commit 2096cd1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions main/src/ui/manage_accounts/dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ 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(() => {
string? pw_buffer;
pw_buffer = password_hybrid.text;
if (pw_buffer != null && pw_buffer.length > 0 && pw_buffer != "************") {
selected_account.password = pw_buffer;
if (password_hybrid.text != "************") {
selected_account.password = password_hybrid.text;
}
});

Expand All @@ -73,6 +71,7 @@ public class Dialog : Gtk.Dialog {

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

Expand Down Expand Up @@ -205,7 +204,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 2096cd1

Please sign in to comment.