1. 23 Jan, 2021 1 commit
  2. 21 Jan, 2021 2 commits
    • Rob Swindell's avatar
      Fix new GCC warning about return type. · 7b05a613
      Rob Swindell authored
      7b05a613
    • Rob Swindell's avatar
      Support single-part MIME-encoded messages in SMBLIB · c90ba307
      Rob Swindell authored
      This involved the removal of the content-transfer-decoding feature of the SMTP mail server since we need single-part MIME-attached file contents to be stored in their original encoded form (e.g. base64-encoded) and not in binary, for the message body text (where NULs aren't allowed, CR/LF is appended, etc).
      
      I accidentally made this change to smbtxt.c in the new_file_base branch and then copied over here, so there's some unrelated innocuous changes (comment header, removal of SMBCALL) that hopefully won't cause a merge conflict later.
      
      I don't actually receive single-part MIME attached files, so depending on others (e.g. Nelgin and Dream Master) to test for me.
      c90ba307
  3. 11 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Support forwarding of single-part HTML emails, add "Fwd:" subject prefix · d79e9514
      Rob Swindell authored
      When forwarding a single-part MIME-encoded HTML email, the preamble (original message header info) and any user comments, need to be HTML-encoded.
      
      Add the commonly-used "Fwd: " prefix to the default message subject, when forwarding.
      
      This required that smb_getplaintext() no longer always-NULLify the message's text_subtype (e.g. "html"). For single-part messages, this element was getting freed and NULLed.
      
      Add/use a new SMBLIB convenience function to add a string header field, but only if non-NULL: smb_hfield_string()
      d79e9514
  4. 10 Dec, 2020 1 commit
    • Rob Swindell's avatar
      Include comment headers in smb_getmsgtxt() returned buffer · 0c68700b
      Rob Swindell authored
      even when GETMSGTXT_PLAIN mode flag is used and the message contains a MIME-encoded plain-text portion. Obviously the GETMSGTXT_NO_HFIELDS exception still applies.
      
      The fixed problem was when forwarding a MIME-encoded email, the forwarding information (and user comment, if supplied) could be suppressed/lost.
      0c68700b
  5. 12 Nov, 2020 2 commits
    • Rob Swindell's avatar
      Fix crashing bug introduced in previous commit of this file · 6dd2aedb
      Rob Swindell authored
      Don't pass NULL to strcasestr().
      6dd2aedb
    • Rob Swindell's avatar
      Improved parsing of "charset" parameter in MIME Content-Type header. · ad79c591
      Rob Swindell authored
      In Issue #177, the reported problem message header was "Content-Type: text/plain; charset=utf-8; format=flowed"
      The fact that the "charset" value was not quoted and not space delimited means the charset would have been parsed as "utf-8;", which would not provide an exact match (against "utf-8") in smb_msg_is_utf8() and thus the message body would not be considered to be utf-8 encoded.
      
      The solution is to terminate the "charset" parameter value at the semicolon, if it exists, and the value was not quoted.
      
      Also, for good measure, only search for " charset" or ";charset" to avoid false-positive parameter matches,  like "notcharset".
      ad79c591
  6. 06 Nov, 2020 1 commit
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · 8a7b7308
      Rob Swindell authored
      I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values.
      
      This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service).
      
      The new macros names are bit more descriptive as well.
      8a7b7308
  7. 16 Aug, 2020 1 commit
  8. 19 Nov, 2019 1 commit
  9. 29 Jun, 2019 1 commit
  10. 06 May, 2019 1 commit
    • rswindell's avatar
      MIME header fields are case-insensitive. <sigh> · 7c0dbbb4
      rswindell authored
      So replace some strstr() calls with either (new local function) strStartWith_i()
      or strcasestr(), depending.
      strStartWith_i() return length of the matched word, so no need to sprinkle
      about magic numeric constants everywhere. The extra calls to strlen() are worth
      the code clarity / reliability, methinks.
      TODO: find out if there's a way to calculate the length of string-constants at
      compile-time (?).
      7c0dbbb4
  11. 05 May, 2019 1 commit
  12. 04 May, 2019 3 commits
  13. 30 Apr, 2019 1 commit
  14. 28 Apr, 2019 1 commit
    • rswindell's avatar
      Correctly detect a "last boundary delimeter": · 1cbfce29
      rswindell authored
      --<boundary>--
      
      Without this change, some attachment (e.g. from gmail) would not be correctly
      decoded because gmail would not insert any blank lines between the end of the
      nested multipart/alternative part and the beginning of the attachment part:
      --000000000000d75a0f058779bbb2--
      --000000000000d75a12058779bbb4
      Content-Type: image/jpeg;
      	name="29571163_1640947089321419_3376478908098884084_n.jpg"
      Content-Disposition: attachment;
      	filename="29571163_1640947089321419_3376478908098884084_n.jpg"
      Content-Transfer-Encoding: base64
      
      It looks (from RFC2046) like boundary delimeters should actually be:
      "\r\n--<boundary>", but I'll look into that later.
      1cbfce29
  15. 11 Apr, 2019 2 commits
  16. 10 Apr, 2019 4 commits
  17. 08 Aug, 2018 2 commits
  18. 20 Feb, 2018 1 commit
  19. 28 Nov, 2017 2 commits
  20. 27 Nov, 2017 3 commits
  21. 26 Nov, 2017 1 commit
  22. 25 Nov, 2017 1 commit
  23. 29 Nov, 2016 2 commits
  24. 18 Nov, 2016 1 commit
    • rswindell's avatar
      Introduced 2 new poll concepts: · 5ea459df
      rswindell authored
      - Closures (polls can be closed for new voting by the pollster)
      - Results can have configurable visibility:
        a. Only to voters (and the pollster) - the default
        b. Everyone
        c. Everyone once the poll has closed
        d. Only the pollster
      
      Changes to smb_getmsgtxt():
      Main change: poll questions can now be quoted when replying to a posted poll
      (the results cannot be quoted).
      Also: there's now automatically a blank line inserted between comment header
      fields and poll answers or the msg body text.
      Also: upon any malloc failure, the function now returns NULL.
      New functions: smb_msg_is_from() and smb_addpollclosure().
      5ea459df
  25. 04 Dec, 2015 1 commit
  26. 26 Nov, 2015 1 commit
    • rswindell's avatar
      Long requested feature: · bc9b40c4
      rswindell authored
      smb_getmsgtxt() can now return *just* the plain-text part of a multipart MIME
      encoded message by setting the GETMSGTXT_PLAIN bit in the mode argument.
      This is useful for reading (many) MIME encoded emails via the Terminal server.
      The full MIME body text is left in place for those message viewing methods
      which can nicely handle (e.g. display) non-plain-text parts.
      bc9b40c4
  27. 22 Aug, 2015 1 commit