• src/sbbs3/js_user.c

    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)