• docs/v322_new.md src/sbbs3/services.cpp websrvr.cpp

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Nov 21 19:18:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8093a5954e39adc1e4fbe8ca
    Modified Files:
    docs/v322_new.md src/sbbs3/services.cpp websrvr.cpp
    Log Message:
    Web Server: count logins with an unknown or deleted user as failed

    Every other server that authenticates (terminal, RLogin, SSH, FTP, POP3,
    SMTP AUTH, Services) counts a login with an unknown user name as a
    failed attempt. The web server did not, on either login path, so
    through it a client could guess user names without reaching the
    temporary-ban or auto-filter thresholds or the hack log.

    Now, against the request's client (the forwarded address behind a
    trusted reverse proxy):
    - HTTP authentication counts an unknown user name, with the Basic
    password ("<digest>" for Digest), as a wrong password already was.
    Its !UNKNOWN USER line now names the protocol and client address.
    - The JavaScript login() method counts an unknown user name, now logged
    as !UNKNOWN USER, and a deleted or inactive account. A user record that
    cannot be read is logged as an error and not counted.
    - The Services login() method also counts a deleted or inactive
    account, as the terminal server does on Telnet auto-login. An unknown
    name is logged as !UNKNOWN USER; a user record that cannot be read is
    logged as an error and no longer counted.

    A lookup that could not run (find_login_id() < 0) is still a system
    error and not counted.

    Tested on Linux against an isolated test server, with a temporary-ban
    threshold of 3, through a trusted proxy: three HTTP Basic logins as an
    unknown user, three login() calls for an unknown user, and three for a
    deleted account each led to a temporary ban (403) of that client, while
    a real user's login() from another address succeeded. The Services
    changes were built, not exercised.

    Fixes #1390

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

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