• src/sbbs3/answer.cpp ftpsrvr.cpp login.cpp mailsrvr.cpp upload.cpp

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Nov 11 13:04:30 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/87e3a065c359a7c846f1e7e4
    Modified Files:
    src/sbbs3/answer.cpp ftpsrvr.cpp login.cpp mailsrvr.cpp upload.cpp
    Log Message:
    Check getuserdat() results where a failure was silently ignored

    getuserdat() zeroes user->number on failure (e.g. a user record lock
    timeout) and leaves the other fields as they were. Several callers
    ignored the result, so a transient read error was misreported or acted
    on with data never read:

    - ftpsrvr: the per-command refresh of the logged-in user's record set
    user.number to 0, so every following command failed with "530 Please
    login". Keep the session's existing user data and log the error.
    - login(): the user was treated as unknown, counting as a failed login
    attempt (toward the failed-login filter). Log the read error and fail
    the login the same way a failed user-base lookup already does.
    - RLogin: the password was checked against a record that wasn't read,
    so a valid user could be logged and counted as a failed password
    attempt and disconnected. A failed find_login_id() lookup was likewise
    logged as an unknown user and counted by badlogin(). Log the error and
    fall through to the interactive login instead.
    - mailsrvr: SMTP authentication by IP address turned a read failure into
    a permanent "ILLEGAL RELAY ATTEMPT" refusal; answer 451 instead, as the
    authenticated-relay check now does.
    - User-to-user upload: user_can_download() evaluated an uninitialized
    user_t when the recipient's record couldn't be read. Report the error
    and skip that recipient.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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