• src/sbbs3/js_user.c

    From rswindell@1:103/705 to CVS commit on Wed Jun 6 19:21:26 2018
    src/sbbs3 js_user.c 1.103 1.104
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_user.c
    Log Message:
    Improve JS User class/object reads across a local network by leaving the user.dat file open (for read operations only). Writing still opens and
    closes the user.dat for each property/field modification.


    --- SBBSecho 3.05-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Wed Jun 6 19:35:50 2018
    src/sbbs3 js_user.c 1.104 1.105
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_user.c
    Log Message:
    Updated the JSDOC description of a few User properties.


    --- SBBSecho 3.05-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Mon Aug 6 17:49:21 2018
    src/sbbs3 js_user.c 1.105 1.106
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_user.c
    Log Message:
    js_CreateUserObject(): if passed an internal user_t representation, the
    user data is thusly cached - set the 'cached' property member to TRUE. This prevents an unnecessary re-read of the user file and the leaving the user file (user.dat) open, at least for JS contexts that contain a "user" object. I don't think this explains the "too many open files" errors, but it explains at least *some* number of the user.dat open file descriptors.


    --- SBBSecho 3.05-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Mon Aug 6 19:16:26 2018
    src/sbbs3 js_user.c 1.106 1.107
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    js_user.c
    Log Message:
    If the user number is 0, don't open the user file (user.dat) - the read
    of the user record is going to fail anyway. *this* explains a lot of
    instances of the user.dat file being open concurrently, at least one per
    active thread with a JS context.


    --- SBBSecho 3.05-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Thu Jan 10 11:53:09 2019
    src/sbbs3 js_user.c 1.107 1.108
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17399

    Modified Files:
    js_user.c
    Log Message:
    JSDOCS: Better example for User object creation.


    --- SBBSecho 3.06-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Sun Jul 14 23:53:47 2019
    src/sbbs3 js_user.c 1.110 1.111
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv32210

    Modified Files:
    js_user.c
    Log Message:
    Fix issues with the feature added in rev 1.96 by deuce, Jun 17 2012:
    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. :-)

    --- SBBSecho 3.07-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deuce@1:103/705 to CVS commit on Sat Aug 17 21:27:48 2019
    src/sbbs3 js_user.c 1.111 1.112
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv32518

    Modified Files:
    js_user.c
    Log Message:
    Don't return negative values from user.get_time_left(), instead, clamp to INT32_MAX.



    --- SBBSecho 3.08-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deuce@1:103/705 to CVS commit on Sat Aug 17 21:42:51 2019
    src/sbbs3 js_user.c 1.112 1.113
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1954

    Modified Files:
    js_user.c
    Log Message:
    Add note to user.get_time_left() documentation that you likely want bbs.get_time_left() instead.



    --- SBBSecho 3.08-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Tue Aug 20 18:32:09 2019
    src/sbbs3 js_user.c 1.113 1.114
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv11883

    Modified Files:
    js_user.c
    Log Message:
    Address MSVC2019 warning C4244:
    '=': conversion from 'time_t' to 'unsigned long', possible loss of data


    --- SBBSecho 3.08-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deuce@1:103/705 to CVS commit on Fri Apr 3 01:42:58 2020
    src/sbbs3 js_user.c 1.115 1.116
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21606

    Modified Files:
    js_user.c
    Log Message:
    ARES cannot be compared!



    --- SBBSecho 3.10-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Mon Aug 10 20:54:58 2020
    src/sbbs3 js_user.c 1.118 1.119
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv7146

    Modified Files:
    js_user.c
    Log Message:
    The MOUSE user setting flag is bit 31 (1<<31). Modifying a user.setting 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.

    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Oct 3 12:55:26 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/7faa8a64b0ff3506e3f1fc5f
    Modified Files:
    src/sbbs3/js_user.c
    Log Message:
    Add user properties: birthyear, birthmonth, and birthdayThese allow the easy reading or writing of these sub-field values of theuser.birthdate property. When migrating from the legacy formats (e.g. MM/DD/YYor DD/MM/YY), it's required to write all 3 properties to get a correctbirthdate/age. Otherwise, "13/31/69" could become "19691/69" (for example)which isn't going to parse correctly.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Oct 3 16:30:58 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/fe2b242524ada9e70c4d1410
    Modified Files:
    src/sbbs3/js_user.c
    Log Message:
    Allow negative user property values (e.g. age).
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Wed May 18 15:32:02 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/65e938974bfeac3448008bfc
    Modified Files:
    src/sbbs3/js_user.c
    Log Message:
    Fix User.number increment beyond lastuser issueWhen 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)
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Tue May 31 18:28:27 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/e731ac184d1bb5613cf6fc5f
    Modified Files:
    src/sbbs3/js_user.c
    Log Message:
    Don't clobber an open user.dat file descriptor in js_CreateUserObject()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 thepreviously allocated JS object and allocated private data memory. However, theprivate 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. Thiswould leak open file descriptor.So any (pre)login scripts or web scripts that use the "user" object (whichis all zeroed-out before login) and then allows a user to subsequently login,would leak a file descriptor.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sat Jun 11 14:30:02 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/a87cebdb79abc7bdbd163df9
    Modified Files:
    src/sbbs3/js_user.c
    Log Message:
    Add User close() methodThis can be used to force a close of the user.dat file, if open. Rather thanwaiting for an out of scope User to get garbage-collected, this method couldbe used to force a close of the user.dat file, if it's open. --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Sun Jun 9 18:44:32 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/3a029fa8fae8ec897ecb0d43
    Modified Files:
    src/sbbs3/js_user.c
    Log Message:
    Make legacy/alias properties non-enumerable: computer, modem

    I noticed these redundant properties were being logged for every logon in logon.jsonl. We don't need these properties separately enumerable, and really they shouldn't be used anyway.

    computer is an alias of host_name
    modem is an alias of connection
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Tue Oct 15 00:45:21 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/c780c203a091fa500b91fe01
    Modified Files:
    src/sbbs3/js_user.c
    Log Message:
    New user properties: batch_upload_list and batch_download_list

    For exposing the list path/file for a user's batch up/download lists
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)