• src/sbbs3/str.cpp

    From Rob Swindell@VERT to Git commit to sbbs/master on Saturday, October 24, 2020 22:05:59
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/07c561f900bd466780ff1966
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    CRLF after each protocol option when less than 80 column terminal

    Beautification for 40 column terminals.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, April 04, 2021 15:13:58
    https://gitlab.synchro.net/main/sbbs/-/commit/1e1f08debc3aa9ed420cad99
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    strcpy -> SAFECOPY

    CID 33568

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, April 04, 2021 15:13:58
    https://gitlab.synchro.net/main/sbbs/-/commit/03760e03ace9ac78c807b199
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    read_ar is no longer a ptr, it's an array

    CID 319112

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, April 04, 2021 15:27:36
    https://gitlab.synchro.net/main/sbbs/-/commit/79e20c8d13e5c3ae1b735e05
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    This strcpy() needs to remain as was (caught be GCC).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, March 02, 2022 13:25:51
    https://gitlab.synchro.net/main/sbbs/-/commit/cd20a33c68e84dedb13b1cf5
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Fix CID 33261 Argument cannot be negative

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thursday, March 03, 2022 16:45:56
    https://gitlab.synchro.net/main/sbbs/-/commit/431a70b1c6193e4d1df4f39b
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Fix CID 33227: Argument cannot be negative

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thursday, March 03, 2022 16:45:56
    https://gitlab.synchro.net/main/sbbs/-/commit/7aa7df50b45902c7902e91a6
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    More correct error message

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, March 05, 2022 11:48:13
    https://gitlab.synchro.net/main/sbbs/-/commit/bfac7e38c8f41607afa0d16f
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Fix CID 174323: Unintended sign extension

    At least, I think this fixes it.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Friday, March 25, 2022 01:16:50
    https://gitlab.synchro.net/main/sbbs/-/commit/1f0d53ca86a9bbdac81dd234
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Remove the hard-coded ".msg" extension from data/subs/*.msg display file

    And data/dirs/*.msg display file. Now you can have any supported menu file in this location if you wish.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tuesday, May 31, 2022 18:28:27
    https://gitlab.synchro.net/main/sbbs/-/commit/402f4377f3bb0c9108c22d54
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Close the open user.dat upon (unlikely/impossible) malloc error

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thursday, February 09, 2023 19:08:22
    https://gitlab.synchro.net/main/sbbs/-/commit/0975d578353111fc53f95127
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Fix 30-year-old bug (obvious password patterns) in chkpass()

    Off-by-one bug caused the comparison of only the first 3 chars of the proposed password against "QWE", "ASD", and "!@#" rather than the 4 character pattern match as intended.

    These lines should be removed anyway since this can be easily achieved via password.can (as intended), but I couldn't help myself but to fix this ancient bug.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wednesday, October 25, 2023 19:26:24
    https://gitlab.synchro.net/main/sbbs/-/commit/e0d9cc8e28042df7cd86f647
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Fix g++ compile error (did not appear with MSVC)

    error: ISO C++ forbids comparison between pointer and integer

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Friday, February 02, 2024 00:26:28
    https://gitlab.synchro.net/main/sbbs/-/commit/76cda34346beea2052cee415
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Fix sbbs_t::trashcan(), broken one month ago

    Transposed the order of parameters in commit 20dbd40c. Oops.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tuesday, December 24, 2024 13:33:38
    https://gitlab.synchro.net/main/sbbs/-/commit/300d0c127a1f2f44f684874b
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Close file description in error condition

    Fix CID 516462

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tuesday, February 11, 2025 18:25:08
    https://gitlab.synchro.net/main/sbbs/-/commit/906b193a2109821b66062d43
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Fix case-sensitivity issue in charset element of path in last commit

    fexistcase() only corrects the case of the filename, not the directories in
    the path. So we'll just use the lowercase version of the charset string, always.

    Also, return false upon failure of any call to replace_text(), not just the last one.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Monday, March 31, 2025 18:52:59
    https://gitlab.synchro.net/main/sbbs/-/commit/7be352ac1ab689194d27bec1
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Support optional ctrl/<terminal-protocol>/text.ini file

    If the sysop wants custom text.dat strings to be unique per terminal
    connection protocol (e.g. telnet, rlogin, ssh, raw), this is how that
    can be achieved (e.g. ctrl/rlogin/text.ini can be used to override text.dat strings only for RLogin connections).

    To at least partially address issue #897

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thursday, April 10, 2025 23:39:24
    https://gitlab.synchro.net/main/sbbs/-/commit/a81e64575c9f30c0a3af0fd5
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Rework part of the "good password" checking algorithm

    Require that a good password contain a sequence of unique characters
    (not repeating, incrementing, or decrementing in ASCII code value) of at least half the configured minimum password length. By default, the minimum password length is 4 chars, so this means a sequence of at least 2 unique characters
    is required. If the minimum password length is increased by the sysop, so is the minimum required unique sequence length. The "PasswordInvalid" text.dat string is printed when passwords are rejected by this criteria.

    Previously, the following would be rejected by this portion of the algo,
    this logic has been replaced by the above:
    - all chars the same (would print the "PasswordInvalid" text.dat string)
    - first 4 chars are incrementing ("PasswordObvious" string printed)
    - first 4 chars are decrementing ("PasswordObvious" string printed)

    but now, a password that starts with "1234" or "abcd" is fine so long as it's longer than that and contains the minimum unique sequence length. This will prevent SBBS from rejecting high quality (e.g. randomly generated or crypto-hashed) passwords that just happen to begin with an incrementing sequence of 4 digits or alpha-characters.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tuesday, May 20, 2025 20:29:15
    https://gitlab.synchro.net/main/sbbs/-/commit/6e91b37768cb527efc9cd9d7
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Handle getuserdat() failure in sbbs_t::change_user()

    Address Coverity CID 551209

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, December 08, 2025 22:27:03
    https://gitlab.synchro.net/main/sbbs/-/commit/d9988229e3a444169168c37f
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Clean up the sbbs_t::console (JS console.status) bit flags

    Mainly this is renaming CON_R_ECHOX to CON_PASSWORD, but also eliminating several long-unused flags.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, December 08, 2025 22:38:52
    https://gitlab.synchro.net/main/sbbs/-/commit/6bb344da28b652cd96eb87a3
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    sbbs_t::trashcan() supports the quiet attribute

    Resolve MSVC warning in timestr()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Saturday, January 03, 2026 00:14:09
    https://gitlab.synchro.net/main/sbbs/-/commit/9e3ca95d9c966929f720d453
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    Overhaul the gettmplt() (in JS, console.gettemplate) function

    Oh this was (and in some ways is still) oh so broken and has been forever.

    If backspace, DEL, or Ctrl-X was used, the returned string was often not what was being displayed on the terminal when the user hit ENTER. <sigh>

    - Ctrl-X, Backspace and DEL actually clear out the entered text now
    Backspace/DEL don't remove the non-template (e.g. symbol) chars though
    - The left and right arrows keys can now be used to traverse the edited text
    - TAB is now treated the same as CR (much like getstr())
    - When editing a string, the cursor starts at the first character instead of
    the last as this seems much more convenient. Perhaps getstr() should get the
    treatment, but I hesitate because getstr() is used by so many.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Friday, January 09, 2026 02:24:03
    https://gitlab.synchro.net/main/sbbs/-/commit/808412db3363f14dd56a7a58
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    If the file text/menu/[sub|dir]info.* exists, display it

    ... instead of SubInfo or DirInfo text strings.

    Another couple optional displays file that can be used to replace built-in logic and text strings for easier customization.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, January 12, 2026 00:51:06
    https://gitlab.synchro.net/main/sbbs/-/commit/0953bd8f6d476074c2d5418e
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    A blank line before the View system information file? prompt looks better

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thursday, February 12, 2026 20:24:34
    https://gitlab.synchro.net/main/sbbs/-/commit/f6a94c9e0a470a83acda5329
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    replace_text() now supports the text[.*].ini [substr] section

    This allows substring replacements in text.<lang>.ini files, for example, making localization (translations to non-English languages) even more practical.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wednesday, May 06, 2026 22:36:57
    https://gitlab.synchro.net/main/sbbs/-/commit/fadcfd96c23be40c6487bd48
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    str: explicit truncation cast in spy() char assignment (CID 549016)

    After the 'if (in == NOINP) continue;' check, in is in [0,255], so
    'ch = in' is safe Ä but Coverity flags it because incom() returns
    int and ch is char. Make the truncation explicit with (char)in to
    silence the analyzer; semantics unchanged.

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tuesday, September 29, 2026 15:57:27
    https://gitlab.synchro.net/main/sbbs/-/commit/21736a5bdea48f464fab76c8
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    New-scan time entry: show am/pm in the hour field, drop the pm?/am? question

    On a 12-hour-clock system, the hour field was pre-filled with just the
    hour (e.g. "1" for 1:29 pm), followed by a "pm?" or "am?" yes/no question
    whose default came from the original time. Users read the bare hour as a 24-hour value and ended up with pm when they meant am.

    The hour is now pre-filled with its am/pm (e.g. "1 pm") and accepts
    either an hour of 1-12 with an am or pm suffix ("1 am", "1pm", "1 p") or
    a bare 24-hour value (0-23); the separate question is gone. The suffix is matched by the first letter of the translatable NScanAmQ and NScanPmQ
    text strings, so translations of those must start with different letters.
    Hours over 23 are now rejected in 24-hour mode as well. (#1265)

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tuesday, September 29, 2026 15:57:27
    https://gitlab.synchro.net/main/sbbs/-/commit/3b827c985cc463f4f4b41fb4
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    New-scan time entry: re-prompt the hour in place

    The date/time entry prompts share one line (Year, Month, Day, Hour,
    Minute). When the hour was rejected, the re-prompt started a new line and repeated the "Hour:" prompt. Instead, erase the rejected input, sound the
    bell, and present the suggested value in the same field. (#1265)

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wednesday, September 30, 2026 02:44:22
    https://gitlab.synchro.net/main/sbbs/-/commit/df8b8248ed275ccc0c8325f3
    Modified Files:
    src/sbbs3/str.cpp
    Log Message:
    New-scan hour entry: match am/pm by unique prefix, not first letter

    The hour prompt recognized the am/pm suffix by its first letter alone and tested AM first, so a translation whose AM and PM words begin with the
    same letter could never select PM. The typed suffix must now be one of
    the two words, or the beginning of exactly one of them: "1 p" and "1 pm"
    still work, an abbreviation that fits both words re-prompts, and so does
    a suffix that is neither (e.g. "1 apple", formerly taken as 1 am).

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

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