Skip to content
Snippets Groups Projects
  1. Feb 27, 2023
  2. Oct 20, 2022
  3. Oct 18, 2022
    • Rob Swindell's avatar
      Full read/write support of new user.tab userbase file · 8a22b246
      Rob Swindell authored
      Also resolved some 32 vs 64-bit 'long' issues/ambiguities that have long-remained. :-)
      
      This commit also removes logon.lst file support.
      
      There's a TODO block remaining in js_user.c for setting portions of a user's birthdate (e.g. just the year or month or day).
      8a22b246
  4. Jun 11, 2022
    • Rob Swindell's avatar
      Add User close() method · 3a5609f3
      Rob Swindell authored
      This can be used to force a close of the user.dat file, if open. Rather than
      waiting for an out of scope User to get garbage-collected, this method could
      be used to force a close of the user.dat file, if it's open.
      3a5609f3
  5. Jun 01, 2022
    • Rob Swindell's avatar
      Don't clobber an open user.dat file descriptor in js_CreateUserObject() · 792237df
      Rob Swindell authored
      Likely fix for the user.dat open file descriptor leak:
      If js_CreateUserObject(cx,parent,cfg,"name",...) is called multiple times
      (e.g. before login and after login), the successive calls will reuse the
      previously allocated JS object and allocated private data memory. However, the
      private data memory (which includes the descriptor of an open user.dat file,
      if it has been opened), was always zeroed, even if it was being reused. This
      would leak open file descriptor.
      
      So any (pre)login scripts or web scripts that use the "user" object (which
      is all zeroed-out before login) and then allows a user to subsequently login,
      would leak a file descriptor.
      792237df
  6. May 18, 2022
    • Rob Swindell's avatar
      Fix User.number increment beyond lastuser issue · af1ae777
      Rob Swindell authored
      When the 'number' property of an instance of User was incremented beyond the last user, the call to fgetuserdat() on subsequent property 'get' operation would fail and zero-out the user structure (including the user number). This resulted in an infinite loop in load/birthdays.js where the user number would go from lastuser to 1 in one operation (u.number++).
      
      Reported by DesotoFireflite (VALHALLA)
      af1ae777
  7. Mar 24, 2022
    • Rob Swindell's avatar
      Support user credits and transfer stats > 4GB in total · 2d4ec7b8
      Rob Swindell authored
      Credits and daily free credits are accurate to the byte up to (a maximum) of 18446744073709551615 (that's 18 Exbibytes - 1).
      
      User's upload and download byte stats are now similarly extended in maximum range, but the accuracy is only "to the byte" for values less than 10,000,000,000. Beyond that value, the accuracy declines, but is generally pretty damn accurate (to 4 decimal places beyond the nearest multiple of a power of 1024), so I don't expect that to be an issue. This method of storing upload/download byte stats allowed me to use the same 10-character user record fields in the user.dat file.
      
      As a side-effect of this enhancements:
      * User and file credit values are now expressed in multiples of powers of 1024 (e.g. 4.0G rather than 4,294,967,296).
      * Free credits per day per security level has now been extended from 32 to 64-bits (to accommodate values >= 4GB).
      * adjustuserrec() now longer takes the record length since we can easily determine that automatically and don't need more "sources of truth" that can be out-of-sync (e.g. the U_CDT field length going from 10 to 20 chars with this change).
      * setting the stage for locale-dependent thousands-separators (e.g. space instead of comma) - currently still hard-coded to comma
      * more/better support for files > 4GB in size (e.g. in the batch download queue)
      * user_t ulong fields changed to either uint32_t or uint64_t - I didn't realize how many long/ulong's remained in the code (which are sometmies 32-bit, sometimes 64-bit) - ugh
      * Steve's ultoac() function renamed to u32toac() and created a C++ wrapper that still uses the old name, for homage
      2d4ec7b8
  8. Feb 05, 2022
  9. Jan 28, 2022
    • Rob Swindell's avatar
      Use sbbs.ini [web] FileVPathPrefix to configure web filebase prefix · bfe32c7a
      Rob Swindell authored
      It bothered Deuce having a web server setting in scfg_t/SCFG->File Options, so I moved this setting to [web_]startup_t and the sbbs.ini file.
      
      The downside is that file_area.web_file_prefix is no longer available to JS environments outside of the web server and terminal server, but meh, probably not going to use it elsewhere anyway? I can imagine use cases for JSexec scripts to want to generate URLs to filebase files. If that ends up being a need, they'll have to find and parse the "right" sbbs.ini file to determine the vpath prefix. 
      bfe32c7a
  10. Apr 04, 2021
  11. Dec 09, 2020
    • Rob Swindell's avatar
      Make read/unread mail-waiting stats easier to access · fee51099
      Rob Swindell authored
      New JS User.stats properties:
      - read_mail_waiting
      - unread_mail_waiting
      - spam_waiting
      
      New @-codes:
      - MAILR (read mail waiting)
      - MAILU (unread mail waiting)
      
      And the corresponding MAILR# and MAILU# codes (for non-current user's stats).
      
      Addresses feature request #191.
      fee51099
  12. Oct 25, 2020
    • Rob Swindell's avatar
      Support manual terminal columns setting per user · cb442b53
      Rob Swindell authored
      The default terminal columns (still 0/auto) can be overridden with the 'L' command from the user defaults menu. 
      
      Also increased maximum manual terminal rows setting from 99 to 999 - this involved moving the record in user.dat, though the old record value is auto-migrated.
      cb442b53
  13. Oct 15, 2020
  14. Oct 03, 2020
  15. Aug 16, 2020
  16. Aug 11, 2020
    • rswindell's avatar
      The MOUSE user setting flag is bit 31 (1<<31). Modifying a user.setting · 03004b56
      rswindell authored
      property with bit 31 set would result in a user.setting value of 0xffffffff which means the user is both deleted and inactive (all bits are set).
      JS_ValueToInt32() does "bad things" when bit-31 is set in the value being converted, use JS_ValueToECMAInt32 or JS_ValueToECMAUint32 instead.
      03004b56
  17. May 14, 2020
    • rswindell's avatar
      No longer dynamically allocate compiled access requirment (AR) strings for configuration items. · 110cc8ac
      rswindell authored
      SCFG for Win32 is linked against a load_cfg lib that builds withOUT SCFG defined, so these compiled AR elements were allocated and then many SCFG operations (e.g. copy/paste, create new) would copy the allocated ARs to another configuration and then be subjected to double-free upon exit/clean-up (resulting in exception or crash).
      Just get rid of this cruft and some other related RAM-byte-saving hold-overs from the MS-DOS days.
      110cc8ac
  18. Apr 12, 2020
    • rswindell's avatar
      Enhanced the User.downloaded_file() method to do "all the things" necessary · d36932a5
      rswindell authored
      after a file has been successfully (partially or fully) downloaded by a user:
      - arguments are [dir-code] [file path or name] [bytes] [count]
      Technically, all the argumnets are optional, but if only a bytes or file count
      is provided, the old behavior of the method is invoked (just increments
      statistics).
      
      This is intended for use by ecWeb's http-based file downloader thing. :-)
      d36932a5
  19. Apr 03, 2020
  20. Aug 21, 2019
  21. Aug 18, 2019
  22. Jul 15, 2019
    • rswindell's avatar
      Fix issues with the feature added in rev 1.96 by deuce, Jun 17 2012: · 08a95e22
      rswindell authored
      Setting user.security.flags[1-4], exemptions, or restrictions to a string value
      would result in unexpected modified values:
      
      1. The exiting flags were all based on the current value of flags1 (copy/paste
          error it appears)
      2. The set/removed/added flags were all "off-by-one" because str_to_bits()
          treats 'A' as bit-1, not bit-0.
      
      emailval.js is now using this feature and PSI-Jack reported the "interesting"
      behavior. :-)
      08a95e22
  23. May 04, 2019
    • rswindell's avatar
    • rswindell's avatar
      Define and use a wrapper for JS_GetInstancePrivate(): js_GetClassPrivate() · 6f83c4ff
      rswindell authored
      Use this in place of JS_GetPrivate() in native class methods that need the
      class instance's private data pointer and will do bad things if that pointer
      points to something other than what is expected. mcmlxxix (matt) discovered
      that using Object.apply(), you can invoke class methods where the 'this'
      instance is a different class. This would result in
      "Internal Error: No Private Data." or a crash.
      So now, gracefully detect this condition and report a meaningful error:
      "'<class-name>' instance: No Private Data or Class Mismatch"
      
      Also, important to note: if the method uses JS_THIS_OBJECT to get the JSObject*
      to pass to JS_Get*Private, then it must do this *before* it calls JS_SET_RVAL.
      
      From jsapi.h:
       * NB: there is an anti-dependency between JS_CALLEE and JS_SET_RVAL: native
       * methods that may inspect their callee must defer setting their return value
       * until after any such possible inspection. Otherwise the return value will be
       * inspected instead of the callee function object.
      
      The js_crypt*.c files still need this treatment.
      6f83c4ff
  24. Jan 10, 2019
  25. Aug 07, 2018
  26. Jun 07, 2018
  27. Feb 20, 2018
  28. Nov 13, 2017
    • rswindell's avatar
      New feature: control of SPAM visibility when reading mail on the Terminal · d18bd3bd
      rswindell authored
      Server via the new 'V' command from the Reading Mail prompt allows you to
      toggle between all mail (including SPAM, the default), SPAM only, or HAM only.
      Also added a new '/' (search text) command from the reading mail prompts.
      Mail imported before the mailsrvr added support (recently) for the MSG_SPAM
      attribute flag will not be counted/filtered as SPAM.
      SBBSecho will have a commit (next) to support the new loadmail() usage, it
      will not compile until then.
      d18bd3bd
  29. Aug 20, 2015
    • deuce's avatar
      Update to 3.17a · dbbfabf1
      deuce authored
      New Features:
      - Multiple bindings for each service
        Use comma-separated interfaces on Interface= lines in the ini file.
        Default is now "0.0.0.0,::"
      - IPv6 support
      - TLS support for the webserver and (non-static) services
        New TLS option in services.ini (ie: Options=TLS)
      - Decrease LEN_SCAN_CMD to 35 chars, increase the CID field to 45 chars,
        and rename the MAIL_CMD string to IPADDR.  I think this frees up the
        note field for SysOp use.
      dbbfabf1
  30. Apr 06, 2014
  31. Feb 10, 2013
Loading