• src/sbbs3/answer.cpp js_user.cpp useredit.cpp

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Aug 9 07:19:18 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/62f96a750b543ccfcb3b26f3
    Modified Files:
    src/sbbs3/answer.cpp js_user.cpp useredit.cpp
    Log Message:
    Don't truncate user numbers to 16 bits

    user_t.number is int and USER_MAX_NUM is 1000000, but four sites clamped
    it to ushort, so on a system with more than 65535 users:

    - new User(65537) silently returned user #1 instead of failing
    - the u.number setter dropped the high bits
    - the js_user cache refresh re-truncated the number on every property
    read, undoing an otherwise correct assignment
    - check_pubkey() built the data/user/NNNN.sshkeys path from a truncated
    number, so SSH public-key auth would consult the wrong user's keys

    All long-standing leftovers from 16-bit user numbers: the uedit prompt
    since 7e3e47141a (2000-10-10), the User constructor since 8b9d21ec36 (2008-01-11), the setter since 0fbca2b608 (2009-03-21), check_pubkey()
    since ac6a78f964 (2024-01-21), and the cache refresh since cd74488bdf (2026-01-06).

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net