• login.js: “confirm your e-mail address” input is cut short on narr

    From Michael Pittsley@1:103/705 to GitLab issue in main/sbbs on Fri Oct 30 07:13:56 2026
    open https://gitlab.synchro.net/main/sbbs/-/work_items/1312

    Version: Synchronet 3.21e, exec/login.js (email_passwords feature)

    What happens: When a user enters a wrong password and answers Yes to “Email your password to you,” login.js asks them to confirm their Internet e-mail address. On narrower terminals, the confirmation input stops accepting characters before the address is complete, so the comparison fails and the user gets “incorrect email address.”

    How to reproduce:

    Give a user a longer address in their NetMail field (for example, 22 characters: pyrethrins@hotmail.com). Connect with a 64-column terminal and enter a wrong password for that user. Answer Y to “Email your password to you.” Type the full address at the confirmation prompt.

    Expected: the full address is accepted, and the password email is sent. Actual: input stops after 18 characters (pyrethrins@hotmail), and the address is reported as incorrect.

    Cause (as far as I can tell): The prompt “Please confirm your Internet e-mail address: “ is 45 characters long and is printed on the same line as the input. console.getstr(LEN_NETMAIL) is called without K_LINEWRAP, so input appears to be limited to the rest of the current screen line (64 − 45 − 1 = 18 characters on a 64-column screen), not to LEN_NETMAIL. On an 80-column screen the limit would be about 34 characters, so longer addresses would fail there too.

    Fix I applied (in a mods/ copy of login.js):

    - console.print("\\x01n\\x01c\\x01hPlease confirm your Internet e-mail address: \\x01y");
    - var email_addr = console.getstr(LEN_NETMAIL);


    + console.print("\\x01n\\x01c\\x01hPlease confirm your Internet e-mail address:\\r\\n\\x01y");
    + var email_addr = console.getstr(LEN_NETMAIL, K_LINEWRAP);

    This moves the input to its own line and lets long addresses wrap on narrow (40-column) screens.
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Fri Nov 6 18:33:10 2026
    https://gitlab.synchro.net/main/sbbs/-/work_items/1312#note_10810

    Thanks for the report and the clear diagnosis - both are correct. `console.getstr()` limits input to the remainder of the current screen line unless `K_LINEWRAP` is set, so the 45-character prompt left only 18 characters at 64 columns (34 at 80).

    Reproduced on a scratch terminal server at 64 columns with a 40-character address, and your fix (prompt on its own line plus `K_LINEWRAP`) is applied verbatim to `exec/login.js`, verified at 40, 64 and 80 columns. It is committed locally and will be pushed soon; the commit references this issue so it will close automatically.

    -- *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab issue in main/sbbs on Fri Nov 6 20:31:26 2026
    close https://gitlab.synchro.net/main/sbbs/-/work_items/1312
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)