summaryrefslogtreecommitdiff
path: root/clients/tui.c
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-23 10:08:44 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-23 10:08:44 +0200
commite06248ef69b33d102a57aaa31fffcde3240dad9c (patch)
treed2b82eb5a5e2918336f89e241efdeed8bed5ca95 /clients/tui.c
parent79b27457125dc2e259783359085021eea1d26e3a (diff)
downloadbokf-0.1.68.tar.gz
bokf-0.1.68.zip
user.set_password: change your own password; TUI "Byt lösenord"v0.1.68
Needs the current password (wrong ones rate limited like logins) and a password session, requires at least 10 characters, closes the user's other sessions and is audited without secrets. The TUI main menu gets "Byt lösenord" with masked prompts; ^R keeps working with the new password. Masked prompt buffers are wiped before they are freed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'clients/tui.c')
-rw-r--r--clients/tui.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/tui.c b/clients/tui.c
index 4bc1d66..43a3d27 100644
--- a/clients/tui.c
+++ b/clients/tui.c
@@ -596,6 +596,8 @@ static int field_scratch(int y, int x, int width, char *buf, size_t cap,
int rc = field_loop(y, x, width, scratch, cap, mask, date, tabs, 1, first);
if (rc)
snprintf(buf, cap, "%s", scratch);
+ if (mask)
+ memset(scratch, 0, cap); /* no password copy left in freed memory */
free(scratch);
return rc;
}