diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-23 10:08:44 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-23 10:08:44 +0200 |
| commit | e06248ef69b33d102a57aaa31fffcde3240dad9c (patch) | |
| tree | d2b82eb5a5e2918336f89e241efdeed8bed5ca95 /src/sessions.h | |
| parent | 79b27457125dc2e259783359085021eea1d26e3a (diff) | |
| download | bokf-e06248ef69b33d102a57aaa31fffcde3240dad9c.tar.gz bokf-e06248ef69b33d102a57aaa31fffcde3240dad9c.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 'src/sessions.h')
| -rw-r--r-- | src/sessions.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
