Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

  1. 23 Oct, 2021 1 commit
    • Rob Swindell's avatar
      Fix segfault after batch-upload when no "uploads" dir specified · 7dc1bc79
      Rob Swindell authored
      When there's no "uploads" directory configured by the sysop, cfg.upload_dir will be set to INVALID_DIR, which cannot be used as an index into cfg.dir[] to determine if the time used for uploading the files should be "given back" to the user.
      
      In v3.18, we used the first file in the upload queue, if there was one, else fell back to the "uploads" dir (which had to have been defined if there were no files in the queue). So this illegal array indexing was a regression in v3.19.
      
      Reported by Zoltán Gábor on Facebook
      7dc1bc79
  2. 19 Oct, 2021 1 commit
  3. 07 Oct, 2021 2 commits
    • Rob Swindell's avatar
      When packing netmail (stored messages), don't discard non-zero zones · ccc0e401
      Rob Swindell authored
      As reported by Ragnarok (DOCKSUD) via DOVE-Net, when packing (packetizing) netmail messages, the source and destination zones from the netmail header were discarded (since they are defined as "optional" in FTS-1) and the zone values were replaced with the system's primary/default zone number. If the netmail message included an INTL kludge, the source and destination zone values would be parsed from that kludge line and this issue would not be noticed. 
      
      So the fix is: Only if the netmail message header contains a source or destination zone number of 0, replace that zone with the system's primary/default zone number. As before, the INTL kludge zone information can override the header fields.
      
      Also, there's no reason to force the point numbers from the header to zero, since if they were not valid (e.g. "fill" in the original FTS-1 specification), they would be already zero. So use the source and destination point numbers, as is, from the netmail header too (with the FMPT and TOPT kludge override support left in-tact).
      ccc0e401
    • Rob Swindell's avatar
      Print "All good" or "All bad" when trying to recover or split a packet · f1994189
      Rob Swindell authored
      At Nelgin's suggestion, if all the messages in a packet are either good or bad, say so (since no .good or .bad file will be generated in that case).
      f1994189
  4. 06 Oct, 2021 3 commits
    • Rob Swindell's avatar
      New @-code: !x to perform Ctrl-A style terminal/attribute control · 87731220
      Rob Swindell authored
      Most Ctrl-A code terminal/attribute effects can now be invoked via @!x@ where x is one or more Ctrl-A sequence operands (e.g. @!B@ to set the current attribute to blue, @!P@ to pause the terminal). Multiple attribute codes may be specified in a single @!x@ sequence. Both upper and lowercase attribute codes are supported. The "^A@" sequence is not supported, but there's already an @-code to perform the equivalent operation ("SHOW:20").
      
      Rationale: when using PabloDraw to edit display (e.g. .msg) files, there was no easy way to explicitly clear (set to "normal") the current attributes at the end of a line of text. If that line of text contained a background color and the line caused the terminal to scroll, that background color would fill the next/new line resulting in some potential undesirable effects. There are 2 common solutions to this problem: either clear the screen before displaying the file (not always desirable) or clear the attributes at the end of the line (before the CR/LF). This can now be achieved by adding a @!N@ (the equivalent of Ctrl-AN for "normal" attributes) to the end of a line. There's no way to insert custom Ctrl-A sequences or other way to force PabloDraw to clear the attributes at the end of a line, that I found.
      
      I chose the '!' character because it's (on my keyboard anyway) the Shift-1 key and Ctrl-A is ASCII 1. I considered a sequence such as @A:x@, but that's one more character and since this sequence usually won't display anything, a shorter sequence is likely preferred. For the shortest-possible sequence, use Ctrl-A sequences instead. However, for many consecutive Ctrl-A sequences, the @-code equivalent might actually end up being shorter(!). @-codes aren't support in as many places in Synchronet where Ctrl-A codes are supported (for security reasons), so it's not like this is going to replace the use of Ctrl-A codes everywhere.
      87731220
    • Rob Swindell's avatar
      New @-codes SEX and GENDERS · 0e270c4e
      Rob Swindell authored
      SEX is the user's sex/gender
      GENDERS is the list of system-supported genders for new users to choose from.
      0e270c4e
    • Rob Swindell's avatar
      Don't append the stale static string in fmsgattr_str() · bb0d2496
      Rob Swindell authored
      When this function was called multiple times (e.g. multiple messages in a pkt),
      it would keep appending to the current (static) string, eventually overflowing
      the buffer and corrupting the stack. Although reported in pktdump, it could
      have also happened with fmsgdump if passed multiple stored message (.msg) files.
      
      Fixes #295 reported by Nelgin
      bb0d2496
  5. 25 Sep, 2021 2 commits
    • Rob Swindell's avatar
      Allow sysop to configure new user gender options (not just M/F) · 7638af10
      Rob Swindell authored
      Up to 40 characters can be configured by the sysop for gender options.
      The default choice/configuration is now: "M/F/X" (not just "M/F")
      New @-code: GENDERS
      text.dat EnterYourSex -> EnterYourGender
      
      Closes enhancement request #291 by Ragnarok
      7638af10
    • Rob Swindell's avatar
      Call smb_updatethread() from sbbs_t::email() to perform Keyop "magic" · aaa6fa7e
      Rob Swindell authored
      As discovered by Keyop and reported via IRC, when replying *to* a local mail box and *not* using the hard-coded email menu (e.g. when when using msglist.js), the original message's "Replied" attribute flag was not set. When replying to a netmail address (at least, Internet or FidoNet, unsure about QWKnetmail), the attribute would be set.
      
      This discrepancy was because this email() function doesn't use the  "modern" smb_addmsg() function (which also calls smb_updatethread()), but add the message body text the old/manual way and never called smb_updatethread(). smb_updatethread() does the thread linkage stuff (which is usually unnoticed in the mail base) *and* sets the "Replied" attribute of the original message, if it's not already set.
      
      This function should be overhauled to use smb_addmsg(), but this 2-line change at least addresses this issue for now. There's probably other places (e.g. importing mail replies via QWK/REP packets) where this thread-linkage and "Replied" attribute flag setting is still not happening.
      aaa6fa7e
  6. 24 Sep, 2021 1 commit
  7. 23 Sep, 2021 2 commits
    • Rob Swindell's avatar
      When importing FidoNet message area tags > 40 chars, use newsgroup name · 095a7b4b
      Rob Swindell authored
      Follow-up to previous commit for Keyop (extending max area tag length from 35 to 40/50 chars), when importing echolists/areas.bbs files, if the area tag is longer than 40 chars, then import it into the newsgroup name field instead (63 chars max).
      095a7b4b
    • Rob Swindell's avatar
      Increase FidoNet echo/area tag max length from 35 to 40/50 chars · 8940bde7
      Rob Swindell authored
      Per FMail.txt:
      Area name
                This is the name of the conference. It can be up to 50
                characters long. This name is often referred to as the
                area tag.
      
      I did not locate a FidoNet spec to contradict that and support a 35 character maximum area tag length. I think Mystic also has a 50 character area tag limit. So 50 character area tags are fine I guess.
      
      So up to 50 characters are now supported in SBBSecho and SCFG for area tags (for message and file echoes). The exception is the (new to 3.19) optional area tag stored in msgs.cnf/file.cnf is limited to 40 characters due to reserved space limitations. If you need a tag stored per sub (most sysops do not) and it needs to be longer than 40 chars, use the newsgroup name instead (limited to 63 chars).
      
      Changed at the request of Keyop via IRC.
      8940bde7
  8. 21 Sep, 2021 1 commit
  9. 19 Sep, 2021 1 commit
  10. 18 Sep, 2021 1 commit
    • Rob Swindell's avatar
      Fix segfault reported with ftpalias.cfg support in some cases · bb1ee459
      Rob Swindell authored
      ftpalias() can return true even when the directory is not set to a valid
      directory index (i.e. set to -1), so using as an array index would definitely
      segfault. Part of commit 8ad30b6c by Deuce 3 years ago.
      
      I didn't test this as I'm not sure exactly the combination of ftpalias.cfg
      content and FTP command received that would trigger this, but it's most
      definitely a bug.
      
      So should fix the segfault reported in issue #288.
      bb1ee459
  11. 06 Sep, 2021 1 commit
    • Rob Swindell's avatar
      When searching for text in file descriptions, always search ext desc · f0d253ef
      Rob Swindell authored
      Since users can (and usually do) display extended descriptions in their normal file listings anyway, it makes sense to go ahead and search them for the text (e.g. with the 'F' command from the default command shell File menu/prompt). So the "search/display extended info" prompt has been changed to just "Display extended file info" since it no longer controls whether or not the extended description is searched for the text (it always is). The FL_EXFIND was renamed to FL_EXT and only controls whether the extended info is display (the FL_FIND mode flag, always renamed, must also be specified for a find with extended info).
      
      This closes feature request #285 by Phil (@plt).
      f0d253ef
  12. 18 Aug, 2021 2 commits
    • Rob Swindell's avatar
      When writing/reading quotes.txt, ignore first 2 lines if WWIV-type · 4d018183
      Rob Swindell authored
      WWIV writes 2 lines of metadata to the beginning of its quotes.txt file created for external message editors. Its not clear yet what these lines should contain, but the first line apparently should contain a '#' character since BREdit checks for this character before deciding to throw-away/ignore these lines (don't use them for quoted text). Thanks mlong for this tip!
      
      So if the external editor is set to "WWIV CHAIN.TXT" in SCFG (even if the door doesn't need/use it), then the quotes.txt file created by Synchronet will contain the extra 2 lines. We're just writing a # to the first line and the second line is blank.
      
      This fixes reported issue #188.
      4d018183
    • Rob Swindell's avatar
      If hitting ESC at Editor Info File prompt, don't prompt for lowercase · 381c8037
      Rob Swindell authored
      Slight usability improvement.
      381c8037
  13. 15 Aug, 2021 1 commit
  14. 09 Aug, 2021 3 commits
  15. 31 Jul, 2021 3 commits
  16. 11 Jul, 2021 1 commit
    • Rob Swindell's avatar
      Ignore the PRIVATE message attribute for the "mail" base · e53c5926
      Rob Swindell authored
      When setting the value of a message's 'can_read' property, ignore the PRIVATE message attribute (which is sometimes set in FTN netmail messages) since it's assumed all messages in the mail base are private, no special destination (to) name matching is needed here.
      
      This only popped up recently via msglist.js because of the recent addition of checking each messages's 'can_read' property.
      
      As reported by <Diehard> via IRC PM.
      e53c5926
  17. 01 Jul, 2021 1 commit
    • Rob Swindell's avatar
      Fix NULL pointer dereference in read_post_data() · f38adc13
      Rob Swindell authored
      What took down cvs/sbbs yesterday:
      Program terminated with signal SIGSEGV, Segmentation fault.
      6203                    session->req.post_data[session->req.post_len]=0;
      [Current thread is 1 (Thread 0x7f2b989ff700 (LWP 17031))]
      (gdb) print post_len
      No symbol "post_len" in current context.
      (gdb) print session->req.post_len
      $1 = 0
      (gdb) print session->req.post_data
      $2 = 0x0
      f38adc13
  18. 29 Jun, 2021 1 commit
  19. 12 Jun, 2021 1 commit
  20. 11 Jun, 2021 1 commit
  21. 10 Jun, 2021 3 commits
    • Rob Swindell's avatar
      Standardize on "metadata" as the description of a file's "tail" dfield · 3549be9f
      Rob Swindell authored
      It's anticipated that this will be used for JS-populated file metadata in JSON format in the future (and not just "archive contents" in .ini format).
      
      Also, fix the double-free issue that was occurring when moving files with extended file descriptions (sbbs_t::movefile()). This was actually the primary problem I was fixing here, but noticed the metadata issue: metadata would not have been moved along with the other file info between bases.
      3549be9f
    • Rob Swindell's avatar
      mv() simplified for the non-copy case · 80422644
      Rob Swindell authored
      Constified function arguments. Source path is still case-insensitive, but destination is case-sensitive (hopefully that's not an issue).
      
      When a "move" (!copy) is requested, a rename() is always attempted first and if successful, job done. Otherwise, we continue on with the file-copy (and then remove).
      
      This should resolve CID 332219 (DEADCODE).
      80422644
    • Rob Swindell's avatar
      Call smb_freefilemem() instead of smb_msgmem() for files · 0c5c140e
      Rob Swindell authored
      Not that it really matters, but perhaps it'll matter in the future. And the code reads better.
      0c5c140e
  22. 09 Jun, 2021 4 commits
  23. 08 Jun, 2021 3 commits
    • Rob Swindell's avatar
      Condition newline before progress display · 52fa8335
      Rob Swindell authored
      Sometimes the progress meter (e.g. during file text searches) appears at a column offset > 0 and doesn't look good. Fix that.
      52fa8335
    • Rob Swindell's avatar
      Increase the progress() reporting frequency for filename/desc searches · cb4067ec
      Rob Swindell authored
      This resolve long delays (while searching for files) without any indication of progress.
      
      Keep new-scan progress interval at 10 dirs however (they're fast).
      cb4067ec
    • Rob Swindell's avatar
      Detect TLS startup errors correct/fully · 6fee1956
      Rob Swindell authored
      We can't (apparently) only rely on the return value of start_tls(), we have to check the value of the crypt session too.
      This fix the possibility of this happening:
      Jun  7 18:07:26 sbbs synchronet: ftp  0058 TLS ERROR 'No permiss.to perform this operation' (-21) opening keyset
      Jun  7 18:07:26 sbbs synchronet: ftp  0058 <192.168.1.25> initialized TLS successfully
      
      Instead, we'll detect the failure and disable FTPS support, logging "failed to initialize TLS successfully".
      6fee1956