• 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:57 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)