• src/sbbs3/ftpsrvr.cpp

    From Deuc¿@VERT to Git commit to main/sbbs/master on Sun Feb 22 10:33:30 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/b795545afa5e0cc6250e0fb2
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    This is C++ now, value-initialize since we can't zero-initialize

    Same-same, but different, but still same.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Fri Mar 6 23:49:36 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/83252750de3b2354f2039a18
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    Log better errors/warnings when upload directory doesn't exist

    or doesn't have enough free space

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Mar 8 19:24:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/815458f875915bbb4cfb2b18
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    s/Unallowed/Disallowed

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Mar 8 19:24:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9d440000f790304469d309db
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    load file data from filebase when updating (uploading) an existing file

    updatefile() assumes the file was already loaded. If it was not, you would get an error updating the file, e.g.
    ftp 3220 <Guest> !DATA ERROR -101 updating file (filename.txt) in database

    Log the restart offset both when the client sets it (with the "REST" command) and in the "uploading" log message, helpful in debugging unique upload issues.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Mar 8 19:24:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/cd30db7872f8ad631aabc16f
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    Case insensitive file-existence check before allowing upload

    The Synchronet filebases are index-searched case-insensitively, so don't allow a dupe file (only differing in case) to be uploaded.

    This would have already been disallowed/prevented on Windows, but not case sensitive file systems (e.g. *nix).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Mar 8 19:24:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/16a9d6c01d1a25c8158210ed
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    More accurate log/response messages about maximum file size allowed

    The max file size allowed for upload can change based on available disk space and the sysop-configured minimum amount of free disk space. Report the correct numbers.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Fri Mar 20 01:30:04 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/bb760f2009bfc0b46c250c05
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    Fix the delete permissions flags in the MLST/MLSD support

    In commit d4deb4b3, the 'R' and 'D' restrictions were conflated.

    I just notice this in code review: the 'D' restriction has nothing to do with removing/deleting files.

    Also, a non-R-restricted user can delete any files they've uploaded.
    Fixed that too.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Aug 4 22:12:21 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/795b48fcf3c4c6d6f7dbd2f5
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    ftpsrvr: don't use a file record that loadfile() failed to fill

    Three sites loaded a file record and used it without checking whether
    the load had succeeded. Two of them left the record uninitialized, so a
    failed load meant reading and then freeing indeterminate memory:

    - the download credit check took the file's cost from an uninitialized
    struct, giving an arbitrary verdict, and then called
    smb_freefilemem() on its wild pointers
    - the upload resume check left the same struct uninitialized along the
    path that clears 'append' and falls through to smb_freefilemem()
    - the delete uploader check zero-initialized the record but ignored the
    result, leaving 'from' NULL for stricmp() to dereference

    loadfile() re-opens the message base, so it can fail even though
    findfile() has just succeeded: a lock timeout, or the record removed by
    another session in between.

    Each site now reports the failure and refuses the request. The record's
    'from' pointer is checked before use as well, since
    set_convenience_ptr() assigns it only when the header carries a SENDER
    field: it can be NULL after a successful load, and the existing
    "unknown user" fallback dereferenced it to test for an empty string.

    The 'filedat' guards around two of those loads go with them. It is
    assigned once and the request is already refused where it is false, so
    the guarded fallback that charged by file length could never run, and
    the guard's only remaining effect was to let an unloaded record reach
    the checks.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Aug 4 22:12:22 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/f650fc4d0d59745c52173537
    Modified Files:
    src/sbbs3/ftpsrvr.cpp
    Log Message:
    ftpsrvr: reset filedat for each RETR/SIZE/MDTM/DELE command

    filedat records whether the requested file was found in the directory's database. It is assigned only in the branch that serves a file base
    directory, but read further down in code common to every branch,
    including those serving a QWK packet, a generated index file, or an
    aliased local path.

    A session that had already run a file base command therefore left it
    set, so a later DELE of one of those non-database files reached
    removefile() with a stale true and removed whichever record in the
    session's current directory happened to carry the deleted file's name.
    An invalid directory number is rejected by smb_init_dir(), so this
    deleted a record rather than crashing.

    The other per-command flags (getdate, getsize, delecmd) are cleared
    where the command is recognized. Clear filedat with them.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net