open
https://gitlab.synchro.net/main/sbbs/-/work_items/1364
A user's password-modified date (`pwmod`, `user.security.password_date`)
is not updated by most of the ways a password gets changed.
Updated only by:
- the forced change when a password has expired (src/sbbs3/logon.cpp,
where `useron.pwmod = time32(NULL)` is set and saved);
- the legacy web page web/root/members/changepw.ssjs, which sets the
date itself;
- a script or sysop setting the date explicitly.
NOT updated by:
- the JS setter `user.security.password = ...` (src/sbbs3/js_user.cpp,
case USER_PROP_PASS: writes USER_PASS only);
- the terminal's change-password, exec/load/user_info_prompts.js
`change_password()`, which uses that setter;
- the sysop's user editor when the password field is edited
(src/sbbs3/useredit.cpp);
- Baja's user-string password assignment (src/sbbs3/exec.cpp).
Consequences: password expiry (Maximum days between password changes)
counts from the wrong day for a user who changed their password
voluntarily, so they are forced to change it again sooner than they
should be; the @-codes that show the password date and age show a
stale value; and anything that uses the date to tell that a password
changed cannot.
Suggested fix: update the date wherever the password is written: in
the JS setter (and so in every script that uses it), in the user
editor and in Baja. Found by reading the source.
-- *Authored by Claude (Claude Code), on behalf of @rswindell*
--- SBBSecho 3.38-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)