Skip to content
Snippets Groups Projects
  1. Sep 07, 2024
    • Rob Swindell's avatar
      Don't use QWK reply message date unless time zone is also specified · 984c371a
      Rob Swindell authored
      For regular user QWK Relpy packet uploads only, if no timezone is specified
      (e.g. via @TZ kludge or HEADERS.DAT), then over-ride the message's "posted"
      date/time with the current date/time since we're going to set the message's
      timezone to the BBS's local timezone as well.
      
      This is a fix for issue #783 reported by Chris Jacobs.
      
      If/when we support user-specified timezones, then this likely would be a
      place where we'd want to use the user's timezone.
      984c371a
  2. Sep 06, 2024
  3. Aug 27, 2024
    • Rob Swindell's avatar
      Fix NULL pointer deref in random_menu() · 46c603ce
      Rob Swindell authored
      When no files with extensions are found, though they matched the glob()
      pattern, a NULL pointer deref would result (segfault).
      
      This could happen if the only files matching the pattern had no extenions or
      were directories (not files).
      
      Fix for issue #779
      46c603ce
  4. Aug 23, 2024
    • Rob Swindell's avatar
      Don't call utime() on the node.dab file for every read · e93b6dfa
      Rob Swindell authored
      ... this was the cause of some observed unnecessarily high disk/file server
      (Samba) utilization, as we call getnodedat() a lot. utime() opens and closes
      the file, which was already open - and we're not modifying the file, so
      updating the 'modification time' here is wrong anyway.
      
      Disabling this 21-year old bit of logic resulted in a pretty dramatic
      reduction in Samba (smbd) CPU utilization on Vertrauen.
      
      If a BBS actually needes this hack (e.g. for NFS compatibility, as Deuce
      eluded in the comment), they'd be better off just setting the "Keep Node File
      Open" node setting (in SCFG->Nodes) to "No".
      e93b6dfa
    • Rob Swindell's avatar
      Extend (and back-off) the user.tab record lock attempts · 69fc70ab
      Rob Swindell authored
      I'v been getting errors locking user.tab (for read) for a while (over samba),
      so hopefully this helps. The lockuserdat() total timeout duration extends from
      about 5 seconds to about 45 seconds (with an incremental back-off).
      
      Implement the same lock-retry logic/limit in putuserdat().
      69fc70ab
  5. Aug 19, 2024
  6. Aug 16, 2024
  7. Aug 15, 2024
  8. Aug 13, 2024
  9. Aug 11, 2024
  10. Aug 10, 2024
    • Rob Swindell's avatar
      Fix the 'node list' command · e1ac8374
      Rob Swindell authored
      No longer claim that 'list' is the default action (it's not).
      
      If you want to list nodes, you need to specify the 'list' action.
      
      Fix for issue #772
      e1ac8374
    • Rob Swindell's avatar
      Add optional array argument to bbs.telnet_gate() and bbs.rlogin_gate() · 564b10b6
      Rob Swindell authored
      If an array argument is passed to these methods, the stringified contents of
      each array element value will be sent to the remote server after connecting.
      
      This is to support Nelgin's request of sending some strings to a server after
      connecting. There's no way to insert pauses between the sent strings or wait
      for certain output from the remote - that's beyond this scope/capability.
      564b10b6
    • Rob Swindell's avatar
      Rename sbbs_t::ungetstr() and JS console.ungetstr() to ungetkeys() · 0d281709
      Rob Swindell authored
      ... since these methods only feed the keyboard buffer.
      
      Add an optional 'insert' argument to console.ungetkeys() - default is false
      (append).
      
      Add a new version of console.ungetstr() which feeds the passed characters
      directly to the receive input buffer. Now returns bool indicating success.
      Existing scripts (if any) that use console.ungetstr() should continue to work
      just fine.
      
      This is anticipation of telgate.js being able to stuff strings (e.g. username,
      password) into the input buffer and those chars/keys being passed to the
      remote (gatewayed) telnet server. Since the telnet gateway reads directly from
      the receive input buffer (ignoring the keyboard buffer), we needed a way to
      stuff strings of characters into the receive input buffer directly and that
      sort of exposed the weirdness of the existing console.ungetstr() method:
      - it didn't return a return value (not indication of failure)
      - it didn't support an 'insert' operation (even though the underlying C++
        method does)
      - it didn't use the sbbs_t method that already existed for feedding a string
        of characters into the input/keyboard buffer
      0d281709
  11. Aug 09, 2024
    • Rob Swindell's avatar
      Global JS exit() function now sets 'exit_code' to 0 by default · d5516d0f
      Rob Swindell authored
      Calling exit() causes JS_ExecuteScript() to return false (same return value
      as if there's a syntax error) - so if we always set exit_code in exit()
      (even when not passed a parameter) and then use that exit code if the property
      is defined, then we get the -1 return value from js_execfile() if the script
      is terminated prematurely without using exit().
      
      This fixes the issue introduced in the previous commit where scripts that
      call exit() - without any parameters, were causing errors to be logged about
      scripts (e.g. timed events) returning -1.
      d5516d0f
    • Rob Swindell's avatar
      Fix infinite loop of error msgs/notifications when JS shell has syntax error · 00774418
      Rob Swindell authored
      js_execfile() now returns -1 when JS_ExecuteScript() return false (failure).
      
      The main command-shell loop will now terminate when js_execfile() returns
      anything but 0 (success), similar to how PCMS (Baja-compiled) command-shell
      .bin file parse errors are handled.
      00774418
    • Rob Swindell's avatar
      Save/reuse the mail save path/filename as a user property (in data/user/*.ini) · c58a0e89
      Rob Swindell authored
      This is a fix for issue #340
      
      Another idea would be to store a history of mail save paths and allow the user
      to scroll through them/choose with the up and down arrow keys, but that goes
      beyond the original feature request. So this just stores/reuses the last
      successfully used path/filename.
      c58a0e89
  12. Aug 08, 2024
    • Rob Swindell's avatar
      Make argument to bbs.batch_clear() optional (clear downlaod queue by default) · 0fbdf31c
      Rob Swindell authored
      ... as appears to have been the intent
      0fbdf31c
    • Rob Swindell's avatar
      Fix CID 508260: Null pointer dereference · 8fc08f0d
      Rob Swindell authored
      And really, more importantly, the msg header field_list array length would
      always be interpretted as 0-length!
      
      ... introduced in commit 54523145
      8fc08f0d
    • Rob Swindell's avatar
      Fix CID 508259: Control flow issue (DEADCODE) · c8a83171
      Rob Swindell authored
      ... introduced in commit 54523145
      c8a83171
    • Rob Swindell's avatar
      Display usage help when unrecognized param is detected · 54277dec
      Rob Swindell authored
      Include -pause and -loop options in usage help output.
      
      Don't delay (sleep) one second when looping and -pause option is used.
      
      Flush the output before waiting for key-press (-pause option is used).
      
      This should all address issue #365. Sorry for the long wait.
      54277dec
    • Rob Swindell's avatar
      Don't display menu of file xfer prots when auto-selecting user's default prot · 64a6ab9d
      Rob Swindell authored
      When a user has a "default download protocol" selected (configured for their
      user account), don't display a menu of file transfer protocols when we're
      just going to auto-select their default anyway (e.g. when downloading a QWK
      packet).
      
      This change also introduces an argument (%s, the protocol name) in the
      StartXferNow text.dat string, so that if/when the user forgets which default
      download transfer protocol they had selected, they'll be reminded ("oh yeah,
      I need start an XMODEM download!").
      
      This fixes issue #767
      64a6ab9d
    • Rob Swindell's avatar
      Prevent NULL pointer dereference when 'null' object passed to JS functions · 54523145
      Rob Swindell authored
      As was discovered as part of investigation into issue #769, a JavaScript
      could crash SBBS (cause a segfault) due to a NULL pointer dereference when
      the script passes 'null' to native JS functions where an object is expected.
      
      The issue raised was with console.gotoxy(), but it turns out that *many*
      Synchronet native JS functions would call JSVAL_TO_OBJECT() and then, without
      checking for NULL/nullptr, pass its return value to JS api functions such as
      JS_GetPrivate, JS_GetProperty, JS_GetClass, JS_ObjectIsFunction,
      JS_IsArrayObject, JS_GetArrayLength, JS_DefineProperty, JS_Enumerate, etc.
      All of these JS API functions dereference the passed object pointer without
      NULL/nullptr checking.
      
      The fix here is to either call JSVAL_IS_NULL() or JSVAL_NULL_OR_VOID() and
      if true, not call JSVAL_TO_OBJECT() and/or check the return value for the NULL
      value before using as an argument to any other JS API functions.
      54523145
  13. Aug 07, 2024
  14. Aug 04, 2024
  15. Jul 12, 2024
  16. Jul 11, 2024
Loading