• src/sbbs3/ftpsrvr.c

    From rswindell@VERT to CVS commit on Thursday, April 05, 2018 21:49:00
    src/sbbs3 ftpsrvr.c 1.466 1.467
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv24592

    Modified Files:
    ftpsrvr.c
    Log Message:
    Initialize estr to NULL in start_tls(), likely cause of free() assert in Windows debug build.


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thursday, April 05, 2018 22:26:00
    src/sbbs3 ftpsrvr.c 1.467 1.468
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28101

    Modified Files:
    ftpsrvr.c
    Log Message:
    The real apparent fix for the free() assertion: use free_crypt_attrstr() instead


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, April 06, 2018 01:05:00
    src/sbbs3 ftpsrvr.c 1.468 1.469
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23693

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix get_ssl_cert() failure log message (wrong number of arguments).
    Put "TLS" in the failure log messages rather than repeating "FTP".


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, April 06, 2018 01:35:00
    src/sbbs3 ftpsrvr.c 1.469 1.470
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    ftpsrvr.c
    Log Message:
    Enable GCC-assisted printf-style format/arg checking for lprintf, sockprintf and send_mlsx().
    Fix numerous printf-style argument bugs, many in the TLS and MLSx support.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, April 09, 2018 02:59:00
    src/sbbs3 ftpsrvr.c 1.470 1.471
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27658

    Modified Files:
    ftpsrvr.c
    Log Message:
    Bug-fix: The GCES macro already prints and *frees* the error string, so
    you can't print and free it again after calling that macro.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, October 05, 2018 04:25:00
    src/sbbs3 ftpsrvr.c 1.472 1.473
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv29765

    Modified Files:
    ftpsrvr.c
    Log Message:
    Log much more detail upon any file open errors in the ftp server.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, October 05, 2018 06:26:00
    src/sbbs3 ftpsrvr.c 1.473 1.474
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv14091

    Modified Files:
    ftpsrvr.c
    Log Message:
    Added (or moved) user's name/alias to/in log output to be more consistent
    with the terminal and mail servers' log output and provide more details
    (e.g. on errors).



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, October 05, 2018 06:27:00
    src/sbbs3 ftpsrvr.c 1.474 1.475
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    ftpsrvr.c
    Log Message:
    GCC spotted a formatting error in the previous commit. Fixed.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, October 05, 2018 08:32:00
    src/sbbs3 ftpsrvr.c 1.475 1.476
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv13941

    Modified Files:
    ftpsrvr.c
    Log Message:
    Don't wait for QWK packet creation if the server has been locally terminated. Double the duration to wait for client threads to terminate. Heck, this might should be an infinite wait since "bad things" happen if the client thread continues after a cleanup().



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, October 17, 2018 19:10:00
    src/sbbs3 ftpsrvr.c 1.476 1.477
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    ftpsrvr.c
    Log Message:
    Deal with some gcc reported printf-use warnings, mainly around 64-bit ints.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, October 31, 2018 07:31:00
    src/sbbs3 ftpsrvr.c 1.477 1.478
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21132

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix bug with filename aliases (in ftpalias.cfg) which caused an incompatility with Chrome (the browser). Chrome will attempt to "CWD" to a filename and if that filename was an alias from the ftpalias.cfg, we would return a
    successful (213) response - erroneously. The code did appear to check for
    this condition by calling ftpalias() with a NULL second (filename)
    parameter, but that didn't actually work. The 'alias+1' check for a slash appears to have (always?) been clearly wrong as a prefixed slash is already skipped (in the requested path) before calling ftpalias().



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From mark lewis@VERT to digital man on Saturday, November 03, 2018 04:08:00
    On 2018 Oct 31 00:31:28, you wrote to CVS commit:

    src/sbbs3 ftpsrvr.c 1.477 1.478
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21132

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix bug with filename aliases (in ftpalias.cfg) which caused an incompatility with Chrome (the browser). Chrome will attempt to "CWD" to a filename and if that filename was an alias from the ftpalias.cfg, we would return a successful (213) response - erroneously.


    FWIW: this is how googlebot determines if the link is a file or a directory... they always try to CD to the given name and if that fails, they they do a get... this being via http(s) as well as ftp(s?)...

    i appreciate this because it aids in a question that i asked on IRC about how to place files into the virtual '/' directory ;)

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Everything has already been said.
    ---
    * Origin: (1:3634/12.73)
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Nelgin@VERT/EOTLBBS to mark lewis on Sunday, November 04, 2018 00:15:00
    mark wrote:
    On 2018 Oct 31 00:31:28, you wrote to CVS commit:

    src/sbbs3 ftpsrvr.c 1.477 1.478
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21132

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix bug with filename aliases (in ftpalias.cfg) which caused an
    incompatility with Chrome (the browser). Chrome will attempt to "CWD" to a
    filename and if that filename was an alias from the ftpalias.cfg, we would
    return a successful (213) response - erroneously.


    FWIW: this is how googlebot determines if the link is a file or a directory...
    they always try to CD to the given name and if that fails, they they do a get... this being via http(s) as well as ftp(s?)...

    i appreciate this because it aids in a question that i asked on IRC about how
    to place files into the virtual '/' directory ;)

    Yup, I asked DM how to do it and he suggested the ftpalias.cfg directory
    but when I tried it there were problems when using Chrome, so we were able
    to squish a bug at the same time.

    ---
    Synchronet End Of The Line BBS - endofthelinebbs.com
  • From rswindell@VERT to CVS commit on Monday, November 05, 2018 07:39:00
    src/sbbs3 ftpsrvr.c 1.478 1.479
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2867

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fixed-up some log output messages:
    - user alias was missing from some messages or in the wrong place
    - added hostname and IP address to the "ILLEGAL FILENAME ATTEMPT" warnings



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, November 06, 2018 07:50:00
    src/sbbs3 ftpsrvr.c 1.479 1.480
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix bug introduced in rev 1.478 which prevented aliased directories from
    being CWD'd (chdir'd) into.
    I resisted the temptation to convert ftpalias.cfg to a different (sane)
    format (e.g. .ini) at this time, but that really should be done.
    Oh, and I noticed that aliases don't work with "DIR" wildcards, so that's a
    bug that needs fixing too.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, November 17, 2018 14:55:00
    src/sbbs3 ftpsrvr.c 1.480 1.481
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5133

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix a couple of problems introduced in the recent ftpalias() churn:
    - a CWD attempt to a /alias/filename would report 'success' to the client
    (Chrome web browser)
    - the ftpalias.cfg file was left open in some instances



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, November 18, 2018 14:53:00
    src/sbbs3 ftpsrvr.c 1.481 1.482
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv27429

    Modified Files:
    ftpsrvr.c
    Log Message:
    Hackety-hack-hack... hack
    So I tested the following cases, which all pass:
    cwd diralias -> 250 CWD command successful.
    cwd /diralias -> 250 CWD command successful.
    cwd /diralias/ -> 250 CWD command successful.
    cwd /diralias/filename -> 550 filename: No such directory.
    cwd /filealias -> 550 filealias: No such diretory.
    cwd /filealias/ -> 550 : No such diretory.
    retr filealias -> 150 Opening BINARY mode data connection for file transfer. retr /filealias -> 150 Opening BINARY mode data connection for file transfer.

    Hopefully is the end of the fixes for Chrome browser ftp weirdness
    (tries to "CWD" to anything/everything to determine if it's a file or not).



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, January 04, 2019 22:12:00
    src/sbbs3 ftpsrvr.c 1.483 1.484
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv18830

    Modified Files:
    ftpsrvr.c
    Log Message:
    Log the currently logged-in user name along with any "!ERROR ... removing" error messages.



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, January 12, 2019 08:52:00
    src/sbbs3 ftpsrvr.c 1.484 1.485
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2461

    Modified Files:
    ftpsrvr.c
    Log Message:
    Optimized all directory listings and index generation:
    - use GLOB_MARK to eliminate calls to isdir() in loops
    - use stat() rather than calls to flength() and fdate()
    - don't call getfiledat() if getfileixb() failed
    - profiling info-level log msgs added for index/listing generation, e.g.
    "detailed listing (3459 bytes) of /main/SBBS (45 files) created in 2 seconds"

    Fixed bug with indexes generated for directories with the
    "Access Files Not In Database" option enabled, files not in database were excluded from the generated index (e.g. 00index, 00index.html).


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, January 12, 2019 10:29:00
    src/sbbs3 ftpsrvr.c 1.485 1.486
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv19961

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix some new issues due to use of GLOB_MARK:
    getfname() on a path that ends in a slash, returns an empty string pointer. Fixed-up some logging output around listing creations.


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, January 18, 2019 09:14:00
    src/sbbs3 ftpsrvr.c 1.486 1.487
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv3268

    Modified Files:
    ftpsrvr.c
    Log Message:
    Further optimization for directory index and listing generation: if "Check for File Existence" is disabled (in SCFG->File Areas... Toggle Options), then don't check the disk for the file's existence, size, or date/time.


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, May 07, 2019 21:12:00
    src/sbbs3 ftpsrvr.c 1.489 1.490
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv10196

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix crash introduced in 1.485.

    When the command is MLST, fp is NULL, so should not be passed to ftell().



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Friday, May 31, 2019 03:31:00
    src/sbbs3 ftpsrvr.c 1.490 1.491
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25642

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix bug where Synchronet FTP Server %s-%s Ready message did not have a
    reply code. Maybe this used to be on the same line as the BBS name?




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to deuce on Friday, May 31, 2019 08:18:00
    Re: src/sbbs3/ftpsrvr.c
    By: deuce to CVS commit on Thu May 30 2019 08:31 pm

    src/sbbs3 ftpsrvr.c 1.490 1.491
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25642

    Modified Files:
    ftpsrvr.c
    Log Message:
    Fix bug where Synchronet FTP Server %s-%s Ready message did not have a
    reply code. Maybe this used to be on the same line as the BBS name?

    No, I think you're misreading the FTP spec (RFC959):
    Thus the format for multi-line replies is that the first line
    will begin with the exact required reply code, followed
    immediately by a Hyphen, "-" (also known as Minus), followed by
    text. The last line will begin with the same code, followed
    immediately by Space <SP>, optionally some text, and the Telnet
    end-of-line code.

    digital man

    Synchronet/BBS Terminology Definition #12:
    CBM = Commodore Business Machines
    Norco, CA WX: 55.6F, 95.0% humidity, 2 mph ESE wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Friday, May 31, 2019 15:39:00
    src/sbbs3 ftpsrvr.c 1.491 1.492
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28963

    Modified Files:
    ftpsrvr.c
    Log Message:
    Revert previous change. NetLogger has the bug, not Synchronet.




    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, August 15, 2020 19:15:39
    src/sbbs3 ftpsrvr.c 1.500 1.501
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23645

    Modified Files:
    ftpsrvr.c
    Log Message:
    More file existence/length checks, with only a WARNING log level (not error) since some QWKnet nodes apparently like to start concurrent QWK packet downloads and inevitably one finishes first, deleting the file, and the second transfer logs and error. Examples:
    8/14 08:10:06p 2296 <EPHRAM> downloading QWK packet (1320 bytes) in passive mode
    8/14 08:10:06p 3792 <EPHRAM> downloading QWK packet (1320 bytes) in passive mode
    8/14 08:10:06p 2296 <EPHRAM> DATA Transfer successful: 1320 bytes sent in 0 seconds (2640 cps)
    8/14 08:10:06p 3792 <EPHRAM> !DATA ERROR 2 (No such file or directory) line 1376 opening s:\sbbs\data\file/0888.qwk
    8/14 11:28:55p 2576 <POTOGOLD> downloading QWK packet (27129 bytes) in passive mode
    8/14 11:28:55p 2576 <POTOGOLD> DATA Transfer successful: 27129 bytes sent in 0 seconds (54258 cps)
    8/14 11:28:55p 1924 <POTOGOLD> downloading QWK packet (4294967295 bytes) in passive mode
    8/14 11:28:56p 1924 <POTOGOLD> !DATA ERROR 2 (No such file or directory) line 1376 opening s:\sbbs\data\file/0168.qwk

    Also some more 64-bit file length support (flength returns an off_t now, not a ulong).
    And ftell() returns a long (not a ulong).



    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sunday, October 25, 2020 05:06:02
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/10477fe29378aebb82b8efd2
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Create the pack*.now with fmutex() to prevent simultaneous QWK packs

    Probably only a problem on Vertrauen, but some QWKnet nodes, for some unknown reason, like to FTP-connect multiple times concurrently and request to download a QWK packet. This creates a race condition where the QWK packet gets created/downloaded/deleted before the second FTP connection can successfully download the same file, thus logging an error "opening file " on the server (VERT). So if the pack*.now file already exists, reject the download request. "What are doing?" is what I really want to ask these nodes, but better just throw them an error response and quietly move on.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, December 30, 2020 07:51:44
    https://gitlab.synchro.net/main/sbbs/-/commit/31d07482c7dc81b1af72e495
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Remove 3 second delay before disconnecting when max clients reached

    This seems to be misguided and would only increase the chances of a DoS-type attack on TCP session resources.

    A second 3-second delay upon malloc failure is also removed.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thursday, December 31, 2020 10:23:34
    https://gitlab.synchro.net/main/sbbs/-/commit/dcb003099daa5b03e53542d4
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Log messages indicating AUTH TLS success or failure and set client prot

    Set the client protocol to "FTPS" upon successful TLS startup in the control connection (response to the AUTH TLS command from the client). Log some messages indicating FTPS was attempted or successful.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, January 09, 2021 21:44:06
    https://gitlab.synchro.net/main/sbbs/-/commit/3ead8a4d227af07c81c2c8e5
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Don't delete pack####.now upon FTP-logoff

    When a user logins to the FTP server concurrently, this creates a
    race condition with an/the other FTP session that may be creating/
    downloading a QWK packet. On Vertrauen, this results in the
    occasional error removing the file since it was removed unexpectedly:
    !ERROR 2 (No such file or directory) in main.cpp line 2747 (event_thread) removing "/sbbs/data/pack1111.now" access=0

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Monday, January 10, 2022 22:27:52
    https://gitlab.synchro.net/main/sbbs/-/commit/7ccc618a991a97d22336fcc0
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Log unallowed/illegal filenames in quotes

    Prefixed or trailing white-space characters would be hard to discern without this.

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