aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2024-01-25 22:08:16 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2024-01-25 22:08:16 +0100
commita9d63642923adaf3511c65562d8c13b4a5b32a83 (patch)
tree43126478778cd16c8c7a8a2619fdf4a0c54e6ffc /main
parent75d29bd6d772bf693c2f24b1db8fe4b8f3597cf0 (diff)
downloaddino-obsfucate-password-length.tar.gz
dino-obsfucate-password-length.zip
Add null checks in password_hybrid.changed.connect signalobsfucate-password-length
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/manage_accounts/dialog.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala
index fb226702..d9939c8f 100644
--- a/main/src/ui/manage_accounts/dialog.vala
+++ b/main/src/ui/manage_accounts/dialog.vala
@@ -44,8 +44,10 @@ 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(() => {
- if (password_hybrid.text != "************") {
- selected_account.password = password_hybrid.text;
+ string? pw_buffer;
+ pw_buffer = password_hybrid.text;
+ if (pw_buffer != null && pw_buffer.length > 0 && pw_buffer != "************") {
+ selected_account.password = pw_buffer;
}
});