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 May, 2021 1 commit
  2. 04 Apr, 2021 2 commits
  3. 15 Feb, 2021 2 commits
  4. 25 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Add/use new FTN "BBSID" control paragraph (kludge line) · f257f2ff
      Rob Swindell authored
      Advertise the system's QWK-ID (a.k.a. BBS ID) in exported echomail messages. This will allow correlation of avatars that were imported via SYNCDATA carried via QWKnet (e.g. DOVE-Net) with messages imported from those same BBSes via FTN.
      
      The alternative was to have SYNCDATA Avatar messages include all the AKAs of each BBS (in the body text), but that was looking like a rather complicated solution. This approach (the BBSID kludge) seems a much simpler solution.
      
      I still need to implement the JS side of this solution however (for avatar lookups using the FTN BBSID), but this was the first important step.
      f257f2ff
  5. 22 Nov, 2020 1 commit
  6. 19 Nov, 2020 1 commit
    • Deucе's avatar
      Add support for documenting class properties to jsdocs. · ceb901d4
      Deucе authored
      Then, add JSDOC support to crypto class constant objects.
      
      Also, since crypto stuff is almost half of all the docs, move all
      the crypto classes and objects to the end. It would be nice if these
      massive lists were hidden by default line the menu tree at the start.
      ceb901d4
  7. 16 Aug, 2020 1 commit
  8. 07 May, 2020 2 commits
    • rswindell's avatar
      Populate the *_net_type fields, even when set to NET_NONE (0), when the · d5c65312
      rswindell authored
      corresponding *_net_addr field is present (not NULL).
      d5c65312
    • rswindell's avatar
      Allow an added or modified message header to have to/from/reply-to "net type"... · e4a5afe2
      rswindell authored
      Allow an added or modified message header to have to/from/reply-to "net type" values of NET_NONE. This is a weird scenario, but it is technically possible (e.g. for nntpservice.js) to save a message with a to/from/treply-to "net address" header, but an associated net-type of NET_NONE. By saving the net-type NET_NONE, when saving a modified header, if the associated net address header field value cannot be parsed into a valid network address, there won't be any error reported, e.g.
      Error -110 adding SENDERNETADDR field to message header
      e4a5afe2
  9. 24 Apr, 2020 1 commit
    • rswindell's avatar
      The RECIPIENTLIST header field would get removed (converted to an RFC822TO · 2b55a49f
      rswindell authored
      header field) when saving a message using the MsgBase class.
      A similar problem existed with REPLYTOLIST/RFC822REPLYTO, but was not actually
      observed.
      Since the following header fields were not populated in the msg header
      "field_list", if they existed in a message header that was modified using
      the MsgBase class, they would be lost:
      - RFC822TO
      - RFC822CC
      - RFC822ORG
      - RFC822REPLYTO
      - RFC822SUBJECT
      2b55a49f
  10. 15 Apr, 2020 1 commit
  11. 06 Apr, 2020 1 commit
    • rswindell's avatar
      MsgBase.open() would not, could not, actually create a message base. · 5da26eca
      rswindell authored
      It would create 3 0-byte files (*.shd, *.sdt, *.sid), but more is actually
      needed for a message base to be "created" (i.e. a call to smb_create()).
      So, MsgBase.open() now uses smb_open_sub() rather than smb_open() to initialize
      theSMB  status fields with the proper default values (based on the sysop
      configuration) and calls smb_crate() if the header file is empty.
      Yes, normally, SCFG creates message bases, but it shouldn't have to
      (e.g. a fresh install on *nix, doesn't actually start with any files in
      data/subs) and now that we have JavaScript-based message lister/readers, we
      really needed this support.
      5da26eca
  12. 04 Apr, 2020 1 commit
    • rswindell's avatar
      Bug: a get_mg_header() followed by a put_msg_header() would add a header field · 562f5e6d
      rswindell authored
      (SMTPREVERSEPATH a.k.a. "reverse_path") if it didn't already have one.
      That's because smb_getmsghdr() will point the msg.reverse_path convenience
      pointer to the from_net_addr if there was no explicit reverse-path (e.g. RFC822's
      "return-path" header field). This could manifest itself in *any* change to a
      message header via JS failing with an "illegal header length increase" error if
      the added header field just happen to put the total header length over the
      allocation threshold of the pre-existing msg header.
      
      Fix: only model a msg header "reverse_path" property if the header field
      actually existed (not based on the SMBLIB convenience pointer).
      When the expand_fields option is used, the old behavior remains but expanded
      headers cannot be written back to the base, so no harm there.
      
      Reported by Coz in #synchronet from failed runs of scrubmsgs.js. Thanks!
      562f5e6d
  13. 19 Mar, 2020 1 commit
    • rswindell's avatar
      Create MsgBase.dump_msg_header() method which will perform a low-level header · fdfbc651
      rswindell authored
      "dump" to an array of strings using the (new) smb_msghdr_str_list() SMBLIB
      function. The message header passed must've been previously returned from
      the get_msg_header() or get_all_msg_headers() method.
      
      A similar dump could be constructed from the header properties, as available in
      JS, but that would be inconsistent with other msg header dumps and likely lack
      header fields or details available from the lowest level dump method provided
      in SMBLIB.
      fdfbc651
  14. 18 Mar, 2020 1 commit
    • rswindell's avatar
      Fix bug in MsgBase.get_index() and get_all_msg_headers(): · 99818009
      rswindell authored
      The number of messages loaded was limited by the number of messages that were
      in the status header the last time the status header was read (i.e. when the
      msgbase was opened or when any of its status header properties were referenced).
      
      Also fixed a couple of weird/useless uses of the WHERE macro in error messages.
      99818009
  15. 01 Mar, 2020 2 commits
    • rswindell's avatar
      JS_GetClass() can return NULL. Don't dereference the return value without · 1b98bebf
      rswindell authored
      checking for non-NULL value.
      1b98bebf
    • rswindell's avatar
      Bug-fix: when enumerating a message header (returned from · 621d77fb
      rswindell authored
      MsgBase.get_msg_header or get_all_msg_headers), the message header object's
      private data (used internally in these C source functions) would be freed and
      NULL'd, apparenty as a form of optimization. This would cause some methods
      which can accept a msg header object as an argument (e.g.
      MsgBase.put_msg_header, bbs.show_msg/show_msg_header) to fail or behave
      in strange ways.
      
      Instead of freeing/NULLing the private data (and depending on that as an
      indication that the header has been enuemrated), just set a member variable
      indicating that the header has been enumerated (once) already.
      
      This is the bug that has been tripping me up with my message lister JS mod
      (see YouTube video). I can finally get that committed to CVS for testing now.
      :-)
      621d77fb
  16. 23 Aug, 2019 1 commit
    • rswindell's avatar
      Add ftn_charset property for message headers. This header field corresponds · 908f0bc7
      rswindell authored
      with the FTN (FTS-5003) "CHRS" control line/paragraph. The values recoginized
      by Synchronet are:
          "ASCII 1"
          "CP437 2"
          "UTF-8 4"
      
      These values indicate that header fields and body text of a message are
      encoded with the specifiec charset. The default (assumed charset, if not
      specified), is CP437.
      908f0bc7
  17. 06 Aug, 2019 1 commit
  18. 24 Jul, 2019 1 commit
  19. 16 Jul, 2019 1 commit
  20. 04 May, 2019 3 commits
    • rswindell's avatar
      smb_getplaintext and smb_getmsgtxt(...,GETMSGTXT_PLAIN) will now fall-back · 284b31b3
      rswindell authored
      to a text/html part of a multi-part MIME encoded message if no text/plain part
      exists.
      Changed smbmsg_t.charset to smbmsg_t.text_charset.
      Added smbmsg_t.text_subtype (e.g. "plain" or "html").
      Fixed issue with parsing parsed plain-text when the charset was the last
      element of the MIME-part header.
      MIMEDecodedPlainTextFmt text.dat line now includes the text sub-type arg
      284b31b3
    • rswindell's avatar
      c48ef5f7
    • rswindell's avatar
      Define and use a wrapper for JS_GetInstancePrivate(): js_GetClassPrivate() · 6f83c4ff
      rswindell authored
      Use this in place of JS_GetPrivate() in native class methods that need the
      class instance's private data pointer and will do bad things if that pointer
      points to something other than what is expected. mcmlxxix (matt) discovered
      that using Object.apply(), you can invoke class methods where the 'this'
      instance is a different class. This would result in
      "Internal Error: No Private Data." or a crash.
      So now, gracefully detect this condition and report a meaningful error:
      "'<class-name>' instance: No Private Data or Class Mismatch"
      
      Also, important to note: if the method uses JS_THIS_OBJECT to get the JSObject*
      to pass to JS_Get*Private, then it must do this *before* it calls JS_SET_RVAL.
      
      From jsapi.h:
       * NB: there is an anti-dependency between JS_CALLEE and JS_SET_RVAL: native
       * methods that may inspect their callee must defer setting their return value
       * until after any such possible inspection. Otherwise the return value will be
       * inspected instead of the callee function object.
      
      The js_crypt*.c files still need this treatment.
      6f83c4ff
  21. 03 May, 2019 2 commits
  22. 02 May, 2019 1 commit
    • rswindell's avatar
      get_all_msg_headers(): · 26bc4b6a
      rswindell authored
      Copy the upvotes, downvotes, and total_votes to the smbmsg_t, replicating
      what is done in sbbs_t::scanposts() - these are used by sbbs_t::show_msghdr()
      so we need to copy them if we're going to be replicating that functionality
      (showing up/down votes and score) in message headers shown with bbs.show_msg()
      and bbs.show_msg_header().
      26bc4b6a
  23. 30 Apr, 2019 1 commit
  24. 29 Apr, 2019 2 commits
    • rswindell's avatar
      Includes SMTP "Received" header fields in field_list array. · 25bb4f49
      rswindell authored
      Refer to the dubious get_msg_body() feature of dot-stuffing as that
      ("dot-stuffing") and not "rfc822-encoding" - because it isn't.
      dot-stuffing is a requirment of SMTP (RFC*821) and NNTP, not RFC822 (oops).
      25bb4f49
    • rswindell's avatar
      Add support for new message header fields: · b53ffc8a
      rswindell authored
      - to_list (RFC822TO, previosuly unavailable via JS)
      - cc_list
      - replyto_list (RFC822REPLYTO, previously unavailable via JS)
      
      Added RFC822FROM to the "field_list" array (previously unavailable via JS).
      Removed SMB_CARBONCOPY from the "field_list" (now duplicated in cc_list).
      b53ffc8a
  25. 11 Apr, 2019 3 commits
  26. 09 Apr, 2019 1 commit
  27. 06 Apr, 2019 2 commits
    • rswindell's avatar
      MsgBase.put_msg_header() now updates the internal (smbmsg_t) representation · 53c677c3
      rswindell authored
      of the message header so that functions that need it (e.g. bbs.show_msg_header)
      don't use/show stale data. This change requires the updated smb_copymsgmem()
      which clear/sets message convenience pointers upon copying hfields from one
      message header to another.
      53c677c3
    • rswindell's avatar
      New MsgBase method: get_index() - returns an array of all message index records · 75417a26
      rswindell authored
      (objects, in the same format as returned by the get_mgs_index() method)
      much faster than iterating through a loop, calling the get_msg_index() method
      for each message. If you want to load messages (e.g. headers, text), filtering
      by criteria found in the message index (attributes, to/from user, subject CRC)
      loading a list of indexes and filtering before calling get_msg_header() for the
      selected messages is much faster than previously available MsgBase object
      methods (e.g. get_all_msg_headers()). If you don't need to filter the loaded
      messages (you really want *all* message headers), then get_index() is of no
      benefit to you, the script-writer. This is most useful for the "mail" msgbase
      where selective loading of messages is more common.
      75417a26
  28. 01 Apr, 2019 1 commit
    • rswindell's avatar
      Fix the message base corruption caused by previous committed changes to · a69c1669
      rswindell authored
      js_put_msg_header (MsgBase.put_msg_header) - we can't free the memory
      associated with 'gotten' msg header. Just use the header offset from the
      header retrieved via MsgBase.get_msg_header() - for fast lookup.
      Also fixed an innocuous extra increment of 'n' in argv/argc loop.
      a69c1669
  29. 24 Mar, 2019 1 commit
    • rswindell's avatar
      New JS bbs methods: · b4d31140
      rswindell authored
      - bbs.show_msg()
      - bbs.show_msg_header()
      Re-worked the JS bbs.netmail() implementation
      sbbs::show_msg(), show_msghdr(), msgtotxt() now take an smb_t* argument
      (don't use the pseudo-global 'smb' in these functions any longer)
      sbbs_t::putmsg() and JS console.putmsg() now accept an optional orig_columns
      argument to specify the original column width of a text for intelligent
      re-word-wrapping (e.g. as taken from a message header field). Previously, the
      original-column value was hard-coded to 80 columns (technically, 79).
      sbbs_t::show_msghdr() no longer sends a CRLF if the cursor is already at the
      top-of-screen (TOS).
      sbbs_t::show_msg() now uses the stored "columns" msg header fields to pass to
      putmsg() to intelligently re-word-wrap message bodies for display.
      sbbs_t::show_msg() and msgtotxt() return bool now instead of void.
      JS MsgBase.get_all_msg_headers() now supports an optional "expand_fields"
      argument (defaults to true). I contemplated just getting rid of the (few)
      expanding header fields (more like default-value-header fields, like 'id'), but
      decided against it, at least for now.
      JS MsgBase.put_msg_header(), the "number_or_offset" argument is optional and
      not needed if a header object argument is provided. Make this clear in this JS
      docs for this method
      
      Note:
      I sat on this commit for a while because I noticed occasional errors like this:
          Node 1 <Digital Man> !ERROR 2 (No such file or directory) (WinError 0) in
          readmsgs.cpp line 217 (sbbs_t::loadposts) locking
          "path/to/sub" access=-100 info=smb_locksmbhdr msgbase not open
      started cropping up after introducing these changes and which I never
      root-caused. But after a clean-build and waiting a week, I haven't seen it
      again, so hopefully it was just a incomplete rebuild issue and not a new bug.
      b4d31140