Skip to content
Snippets Groups Projects
  1. Sep 04, 2019
  2. Sep 01, 2019
  3. Aug 31, 2019
    • rswindell's avatar
      Update the C getnodedat/putnodedat API to not require that the node file · 4c8482c9
      rswindell authored
      (ctrl/node.dab) is constantly closed and re-opened for every non-locking read.
      This is really slow across network file systems and unnecessary, so use a
      similar optimization as the C++ sbbs_t class where the file can (and normally
      is) left open across multiple consecutive reads.
      Create/use opennodedat() function.
      Uses the new CLOSE_OPEN_FILE() macro from xpdev/filewrap.h.
      4c8482c9
  4. Aug 09, 2019
  5. Aug 03, 2019
  6. Aug 02, 2019
    • rswindell's avatar
      Resolve GCC warnings: · 2c84e156
      rswindell authored
      pointer type mismatch in conditional expression
      format '%s' expects argument of type 'char *', but argument 5 has type 'void *'
      2c84e156
    • rswindell's avatar
      Use the RFC822* header fields, only when the actual header fields are · 1da741bb
      rswindell authored
      MIME-encoded.
      If any RFC822* header field is a MIME-encoded UTF-8 string, then set the
      (new) auxattr MSG_HFIELDS_UTF8 flag. This will be used (soon, hopefully) to
      display UTF-8 encoded header fields to users. There's a gotchas here:
      - MIME-encoded header fields with other non-ASCII/8-bit charsets (e.g. CP437,
        ISO-8859) are still stored "as decoded", though the MSG_HFIELDS_UTF8 flag
        may be set *later* (which would be weird), resulting in a mixture of valid
        and invalid UTF-8 header fields. One solution would be to UTF-8-transcode all
        the non-UTF-8 header fields if *any* of them are UTF-8, but we wouldn't
        know which charset to translate *from*. Assuming CP437 isn't going to be
        correct 100% of the time - so punt for now and deal with it at display
        time. e.g. if the MSG_HFIELD_UTF8 auxattr flag is set, but an hfield contains
        invalid UTF-8 data, don't display as UTF-8 (e.g. treat as CP437). We don't
        have translations for other charsets (e.g. ISO-8859) setup yet anyway.
      1da741bb
  7. Jul 25, 2019
  8. Jul 08, 2019
    • rswindell's avatar
      Moved cp437_unicode_tbl and unicode_is_zerowidth() to (new file) unicode.c. · 1340f563
      rswindell authored
      New function (derived from sbbs_t::utf8_to_cp437()): unicode_to_cp437()
      New utf8 functions: utf8_replace_chars(), utf8_str_is_valid().
      utf8_getc() enhancement: val arg may be NULL (for length/validation uses).
      
      Convert quoted UTF-8 message text to CP437 when terminal is not UTF8.
      
      Set Fido CHRS: UTF-8 header field when posted message is UTF-8.
      1340f563
  9. Jul 06, 2019
  10. Jun 28, 2019
  11. Jun 22, 2019
    • rswindell's avatar
      Fix warnings from GCC. · 8db2caa4
      rswindell authored
      8db2caa4
    • rswindell's avatar
      MIME-encoded headers (header field values with RFC 2047 "encoded-words") are · d96bb5d0
      rswindell authored
      getting kind of crazy common now and being employed even when totally
      unnecessary (e.g. encoding strings that contain just plain ASCII):
      - normalize message header fields, when possible
      - normalize UTF-8 encoded characters, when possible (e.g. special punctuation
        chars)
      
      This allows text filters (e.g. subject.can, name.can) to work on MIME-encoded
      header fields and notifications about received e-mails are legible to humans.
      
      Encoded-words that contain actual non-ASCII/CP437 chars (e.g. foreign symbols,
      emojis) are left as encoded-words to be dealt with by whatever displays the
      message header.
      
      Special handling of folded normalized field values was necessary because
      "White space between adjacent 'encoded-word's is not displayed." (per RFC 2047)
      d96bb5d0
  12. Jun 20, 2019
  13. May 24, 2019
    • rswindell's avatar
      Don't read the spamblock.cfg unnecessarily: · 2f2c9ac9
      rswindell authored
      We don't store (findable) hostnames in the file, so don't search for them.
      Don't search file if the host is listed in the spamblock_exempt.cfg file.
      If you have a really large spamblock.cfg file, this could result in the
      unnecessary reading of potential many megabytes of data for each inbound
      SMTP connection. We might want to read this file even less frequently and
      store the list in a searchable str_list_t or something.
      2f2c9ac9
  14. May 11, 2019
    • rswindell's avatar
      Fix most likely cause of new crashes seen in mailsrvr, calls to · 4ca5fc1c
      rswindell authored
      smb_freemsgmem():
      bounce() is using a strange method of copying a message header in memory
      (not using smb_copymsgmem) and when it frees the message, ends up with a
      double-free of the 2 new smbmsg_t members (not header fields): text_subtype
      and text_charset.
      4ca5fc1c
  15. May 03, 2019
  16. May 01, 2019
  17. Apr 29, 2019
  18. Apr 23, 2019
    • rswindell's avatar
      Clean up the hostname look-up stuff: · 60f996f9
      rswindell authored
      - getnameinfo() was being called with NI_NUMERICHOST in the mail server and
        web server (but nowhere else)
      - use a singly-defined macro (STR_NO_HOSTNAME) for the "<no name>" string
        rather than copying it about
      - the webserver apparently assumes that session->host_name will always have
        *some* unique value (e.g. the IP address when no hostname is available) - so
        account for that special need <grumble>
      60f996f9
  19. Apr 11, 2019
  20. Mar 07, 2019
    • deuce's avatar
      There appears to be data corruption in cryptlib if a private key is added · 211a2a1a
      deuce authored
      to a second thread before the first has the session set active.  Add calls
      to lock/unlock the certificate to prevent this.
      
      The better options is likely to have a function that adds the key and socket
      and sets the session active in one call and handles the locking internally.
      
      But I'm lazy, so we get the lock functions.
      211a2a1a
  21. Feb 20, 2019
    • rswindell's avatar
      Reversed course on the WM_QUOTE mode handling in sbbs_t::postmsg() · 57424543
      rswindell authored
      (JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto-
      create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling
      sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE)
      with a custom-created quote file (e.g. with msg tails), that'll still work as
      before (e.g. DDMsgReader.js).
      
      bbs.email() and bbs.netmail() now support an optional reply_header_object
      argument which works like bbs.post_msg(). These methods (and the underlying
      C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the
      quote file now, when the WM_QUOTE mode flag is *not* set.
      
      The auto-created quotes.txt now includes the plain-text version of MIME-encoded
      messages.
      
      the bbs.post_msg(), email(), and netmail() methods now all support reply
      header objects that came directly from bbs.get_msg_header() *or* copies of
      such header objects (but the auto-quoting feature won't work when supplied
      this type of header object). So if passed a header object returned from
      bbs.get_msg_header(), we can now use the message base (for auto-quoting) and
      the underlying msg storage directly (no JS parsing necessary). This is what
      the new js_GetMsgHeaderObjectPrivates() function is used for.
      
      js_ParseMsgHeaderObject() (and the underlying parse_header_object() function)
      now supports either an actual internally-generated msg header object (e.g.
      returned from bbs.get_msg_header()) or one that is a copy or hand-constructed.
      
      quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't
      have to since we can now get to underlying msg storage in the js_msgbase.c
      via js_GetMsgHeaderObjectPrivates().
      
      quotemsg() now reads only the plain-text portion of MIME-encoded messages.
      
      As part of this effort, I modernized the method prototypes using default
      argument values (e.g. WM_NONE for wm_mode arguments) and removed some
      extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are
      automatically added by the sbbs_t::email() and *netmail() functions).
      
      savemsg() now *does* support reply-IDs/thread-linkage via the additional
      'remsg' argument (when non-NULL).
      
      Replaced some use of nulstr with NULL.
      
      Replaced more boilerplate SMB open code with calls to smb_open_sub().
      57424543
  22. Jan 04, 2019
  23. Dec 12, 2018
  24. Oct 22, 2018
  25. Oct 17, 2018
  26. Jul 30, 2018
  27. Jul 20, 2018
Loading