From e06248ef69b33d102a57aaa31fffcde3240dad9c Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Wed, 23 Sep 2026 10:08:44 +0200 Subject: user.set_password: change your own password; TUI "Byt lösenord" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/sessions.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sessions.h') diff --git a/src/sessions.h b/src/sessions.h index d573b23..9c084e0 100644 --- a/src/sessions.h +++ b/src/sessions.h @@ -23,6 +23,8 @@ struct session *sessions_create(int64_t user_id, int is_admin, const char *scopes); struct session *sessions_get(const char *id); void sessions_destroy(const char *id); +/* Ends every session of user_id except keep_id; returns how many. */ +int sessions_destroy_user(int64_t user_id, const char *keep_id); void sessions_free_all(void); #endif -- cgit v1.3