Skip to content
Snippets Groups Projects
  1. Jan 08, 2024
  2. Dec 29, 2023
  3. Dec 21, 2023
    • Rob Swindell's avatar
      Change ssl.c API to include an lprintf callback function for proper logging. · 69eb741b
      Rob Swindell authored
      The JS objects will still log to the terminal server (regardless of which server created/used the objects) however - so that's still a TODO.
      Change do_cryptInit() to return bool, since it does.
      Log detailed error if pthread_once() call fails.
      Lowered-severity (to DEBUG) the log messages related to TLS private key and cert creation and destruction.
      
      FIrst commit from within MSVS, so this might look weird.
      69eb741b
  4. Dec 20, 2023
    • Deucе's avatar
      Fix TLS handbrake/hang/crash issue · 97680179
      Deucе authored
      Private key objects in cryptlib are not copied into sessions when
      they're added, only the refcount is incremented.  These objects
      contain a bignum context, which therefore ends up shared across all
      instances of the private key.  Unfortunately, the locking is on the
      session context, not the private key objects, so shared bignum contexts
      can cause memory corruption.
      
      Further, even if the locking issue was fixed, the performance handbrake
      would still exists... activating sessions that use the same private key
      would be serialized, with the results we've been seeing lately.
      
      With this, each session gets a unique private key, which is loaded
      from the file.  When a session is finished with the key, it is cached
      in a list with an epoch, so when the date on the key file changes, old
      private keys will be eliminated.
      
      While this solves a lot of issues, logging of certificate generation
      and loading issues has regressed to the point where it's effectively
      not done at all. Logging was previously passed back to the caller,
      but given the much longer call chain to get to where a cert is created,
      the extra parameters was just too much. Something better should be
      done here at some point.
      97680179
  5. Dec 19, 2023
  6. Dec 18, 2023
  7. Dec 17, 2023
  8. Dec 15, 2023
  9. Nov 26, 2023
  10. Nov 13, 2023
  11. Jun 26, 2023
    • Rob Swindell's avatar
      Eliminate STRERROR macro · 4a53863e
      Rob Swindell authored
      This macro hasn't done anything meaningful since we stopped using really old
      versions of Borland compilers (and std libraries) where strerror() returned a
      string terminated with a line-feed (\n) character.
      4a53863e
  12. Jun 04, 2023
  13. Apr 13, 2023
    • Rob Swindell's avatar
      Fix false "SUSPECTED BOUNCE ATTACK ATTEMPT" for IPv6 FTP-data connections · b25b5734
      Rob Swindell authored
      This bug only impacted non-passive FTP connections. Using an FTP client
      with active (not passive) data connections over an IPv6 connection would
      false-trigger the "bounce attack" detection and the FTP server responded with
      "504 Bad port number" and logged a hack attempt in data/hack.log.
      
      The issue was that we were comparing the socket address structure (which
      contains other fields besides the address itself) between the control and
      proposed-data connections. While this logic worked okay for IPv4,
      it did not for IPv6 (the 2 structs contained some non-address differences).
      Rather than modify the socket address structures to match where needed, I'm
      just comparing the string representation of the addresses, since that's
      what we really care about anyway.
      
      Thank to "mark i" of Truck Stop BBS for alerting me to this issue
      b25b5734
  14. Mar 24, 2023
  15. Mar 19, 2023
  16. Mar 04, 2023
  17. Feb 19, 2023
  18. Feb 16, 2023
  19. Feb 10, 2023
  20. Feb 09, 2023
  21. Feb 03, 2023
    • Rob Swindell's avatar
      Fix uploader-notification, credit awards, download-counters in FTP downloads · 45b128c0
      Rob Swindell authored
      Since v3.19 (the new filebases), when a user FTP-downloaded a file, we failed
      to properly find/load that file's record from the filebase (searching for the
      file's full path, rather than just the filename), so the code the increments
      the file's download counter, notifies the uploader, awards credits, etc. did
      not ever execute. This means that FTP-downloads for all files downloaded via
      FTP were effectively "free" (and nobody noticed). No error was logged either.
      
      I discovered this while debugging the case of "(null)" filenames in the
      action/download MQTT topic messages being published by the FTP server. So
      that issue is fixed as part of this commit as well.
      
      Oh, and if this code had executed before, it would have memory-leaked the
      file information, so that's fixed too (added call to smb_freefilemem). Ugh.
      45b128c0
  22. Jan 30, 2023
    • Rob Swindell's avatar
      5b522af3
    • Rob Swindell's avatar
      The 3rd great MQTT data scheme update (sorry Nelgin) · e94281e6
      Rob Swindell authored
      - Most published messages (besides log entries) have a timestamp (in ISO8601 format) prepended and tab-separated
      - The order and number of elements in client messages (list and activities) has been updated, now includes user number
      - Server client lists are now published to .../SERVER/client/list
      - Server client activities (connect, disconnect, update) are now published to .../SERVER/client/action/#
      - Server client count is now published to .../SERVER/client (with the maximum client count, if applicable)
      - Server states are now just represented by name (e.g. initializing, ready, stopping, stopped) and not number
      - BBS errors are logged to sbbs/BBS/action/error/LEVEL (where LEVEL is the log level name, e.g. "critical" or "error')
      - All server hack-attempts, SPAM attempts, logins, logouts, uploads, downloads, are published to sbbs/BBS/action/ACTION/*
      - Chat pages are published to sbbs/BBS/action/page/node/#
      - New users (on the terminal server) are published to sbbs/BBS/action/newuser
      - Posted messages and executed external programs (on the terminal server) are published to sbbs/BBS/action/ACTION/CODE topic
      - The event thread started/stopped status is published to .../SERVER/event
      
      Yeah, the wiki will get updated soon to reflect/document all these changes
      e94281e6
  23. Jan 24, 2023
  24. Jan 09, 2023
  25. Jan 04, 2023
    • Rob Swindell's avatar
      Public hack, spam, and error logs at the MQTT BBS-ID topic depth · 7ce24b48
      Rob Swindell authored
      This is more consistent with how these events are logged in a BBS-common log file in data/*.log.
      
      This change also restores the server abbreviation to the error log entries that used to be there until recently.
      7ce24b48
    • Rob Swindell's avatar
      Over-overhaul of MQTT support · 916fdacb
      Rob Swindell authored
      Each Synchronet server is now its own MQTT client. This means there's no
      longer any MQTT logic in the Synchronet "hosts" (e.g. sbbscon.c, ctrl/*.cpp)
      and none needed for SBBS NT services (they'll "just work" with MQTT).
      
      This also means that just about everything (except for nodes, spam and hack)
      is now published per-server (in the sbbs/BBS-ID/hostname/server/ topic branch)
      and if you want aggregated totals or client lists, you'll have to do that in
      your own MQTT client or dashboard.
      
      I also removed the publishing of thread_count and socket_count topics as
      they weren't universally supported across all servers and are of questionable
      value. They can be added back later if determined to be useful.
      916fdacb
  26. Jan 02, 2023
    • Rob Swindell's avatar
      Second part of MQTT overhaul · d1c07811
      Rob Swindell authored
      Now support subscriptions (e.g. recycle topics, node input topics) in SBBSCTRL.
      This required a lot of search/replace and fun with circular struct pointers.
      d1c07811
Loading