• exec/tests/webmail/api.js

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Fri Nov 20 15:25:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/1026573c9a66068d1334dff7
    Modified Files:
    exec/tests/webmail/api.js
    Log Message:
    tests/webmail/api.js: forge a session key that really differs

    The "forged cookie values" case built its forged key by replacing the
    first character of a real session key with "f". The key is random hex,
    so one time in sixteen it already began with "f": the "forged" cookie
    was then the valid one, the server rightly accepted it, and the test
    failed with "forged values: not signed in".

    Use "e" when the key begins with "f", and assert that the forged key
    differs from the real one.

    The test now passed 48 runs in a row; before, it failed about one run
    in sixteen.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Sat Nov 21 11:03:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/ec5d3771f97ed0b91584eb4f
    Modified Files:
    exec/tests/webmail/api.js api_drafts.js send.inc send.js webmail/lib/api.js webmail/lib/locale/en_us.ini webmail/lib/send.js webmail/root/css/style.css webmail/root/js/folders.js
    Log Message:
    WebMail: Max Messages Waiting on send and beside the Inbox

    Sending: a message with a local recipient whose mailbox takes no more
    mail (User.mailbox_full(): more than Max Messages Waiting messages
    waiting, no W exemption) is refused whole before anything is stored,
    with a text of its own that names the recipient, the way one recipient
    the sender may not write to already refuses a send. Bulk mail at the
    terminal skips a full recipient and mails the rest; the difference is
    intended.

    Folder list: folder.list returns inbox_limit { count, limit, level }
    (null with no limit or for a user with the W exemption). The count is User.stats.mail_waiting, the number the mail server compares with the
    limit: every undeleted message to the user in the mail base, Spam
    included, which can be more than the Inbox folder shows. The client
    shows nothing below 80% of the limit; from there a line under the
    Inbox ("Inbox: 85 of 100 messages"); over the limit the same line in
    the warning color with what to do (delete or file some messages, Spam
    counts too).

    Tested by script (exec/tests/webmail, with stand-ins for the user and
    the system): a full local recipient refuses the send with nothing
    saved and names the recipient; only local recipients are asked about;
    the text reaches the API result; inbox_limit under, near, at and over
    the limit, with no limit, with the W exemption and with the system's
    own limit. The line in the folder pane was not seen in a browser.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Sat Nov 21 23:42:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8a0a4c8c9e24f6d7870d3b05
    Modified Files:
    exec/tests/webmail/api.js session.js webv4.js webmail/lib/api.js session.js webv4.js webmail/root/api.ssjs index.xjs part.ssjs
    Log Message:
    WebMail: signing out of webv4 signs out of WebMail too

    With webv4_login on, a user signed in to the webv4 web interface is
    signed in to WebMail without the sign-in form, but the WebMail session
    that started outlived the webv4 one: signing out of the web site left
    the user signed in to their mail.

    A session started from webv4 now records that (via "webv4"), and its
    stamp also covers the key of the user's webv4 session, read from their data/user/####.web file on each request. When webv4 deletes that key
    (the user signs out of the web site) or replaces it (they sign in to it
    again elsewhere), the stamp no longer matches and the WebMail session
    ends, as a password change already ends every session. Only the digest
    is stored, never the webv4 key. A session started with a password is
    not tied to webv4 and never reads the file.

    Fixes #1395

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Sun Nov 22 01:45:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/afa9dc33f55a080997839bc7
    Modified Files:
    exec/tests/webmail/api.js
    Log Message:
    WebMail tests: capture the expected locale error in api.js

    The "no locale files at all" case points the config at a directory
    with no en_us.ini, and locale.js logs "webmail: cannot read ..." at
    error level for each of the test's two calls, which printed two error
    lines in every test run.

    Capture Api.Locale.error around that block, as tests/webmail/locale.js
    does, and assert that both failures were logged and name the file.

    Introduced in c37c7b02f5.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

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