1. 03 Sep, 2014 2 commits
    • Alex Vandiver's avatar
      Standardize on the stricter Encode::encode("UTF-8", ...) everywhere · 1d18663b
      Alex Vandiver authored
      This is not only for code consistency, but also for consistency of
      output.  Encode::encode_utf8(...) is equivalent to
      Encode::encode("utf8",...) which is the non-"strict" form of UTF-8.
      Strict UTF-8 encoding differs in that (from `perldoc Encode`):
      
          ...its range is much narrower (0 ..  0x10_FFFF to cover only 21 bits
          instead of 32 or 64 bits) and some sequences are not allowed, like
          those used in surrogate pairs, the 31 non-character code points
          0xFDD0 .. 0xFDEF, the last two code points in any plane (0xXX_FFFE
          and 0xXX_FFFF), all non-shortest encodings, etc.
      
      RT deals with interchange with databases, email, and other systems.  In
      dealing with encodings, it should ensure that it does not produce byte
      sequences that are invalid according to official Unicode standards.
      1d18663b
    • Alex Vandiver's avatar
      Ensure all MIME::Entity bodies are UTF-8 encoded bytes · 6d9bd63c
      Alex Vandiver authored
      Placing wide characters into MIME::Entity objects can lead to
      double-encoding.  Always treat them as byte stores, encoding as UTF-8
      and noting their character set.
      
      In the case of Approvals/index.html, there was no need for an explicit
      MIME::Entity object; ->Correspond creates one as needed from a "Content"
      argument.
      6d9bd63c
  2. 06 Jan, 2014 2 commits
  3. 16 Dec, 2013 1 commit
  4. 22 Nov, 2013 2 commits
  5. 21 Nov, 2013 1 commit
  6. 25 Oct, 2013 1 commit
    • sunnavy's avatar
      set transfer encoding to base64 for dashboard html email · d3cce810
      sunnavy authored
      there is line length limit for messages in rfc 2822(section 2.1.1).
      though some email systems can auto-wrap long lines perfectly, some did it poorly.
      dashboard html can have very long lines(1000+ chars, e.g. when there are links
      to customized searches with long queries), setting to base64 here is to make sure
      it won't be cut off by buggy email systems.
      d3cce810
  7. 03 Sep, 2013 1 commit
  8. 24 Apr, 2013 3 commits
  9. 12 Apr, 2013 1 commit
    • Thomas Sibley's avatar
      Encode dashboard email header values properly for MIME · ac8392aa
      Thomas Sibley authored
      Dashboard names, included in the Subject, may contain Unicode characters
      which need MIME-word encoding first.  MIME::Entity doesn't handle this
      for us.  This was reported by Christian Loos <github@netsandbox.de>.
      
      From and To are passed through encode_utf8() to avoid double encoding
      issues in MIME::Entity, which only handles octets well.  See the full
      rationale in 57ea0c02.
      
      Unlike Subject, From and To don't get the EncodeToMIME treatment because
      MIME-word encoding From and To as an opaque blob is really, really
      wrong.  You need to encode on a per-recipient level using Email::Address
      to parse, otherwise you can lose special chars such as commas into the
      MIME-word.  While From is likely just an email address, To is non-admin
      user-input and may contain commas or an email phrase part or other
      formatting.  See also the bug [1] in ContentAsMIME where we _do_ use
      EncodeToMIME on From and To and the hilarity that ensues for forwards,
      the primary user of ContentAsMIME.
      
      The correct solution for From and To will be to use the encoding logic
      in 4.2-on-4.0/protect-more-chars-while-decoding-headers once it is merged.
      
      [1] http://issues.bestpractical.com/Ticket/Display.html?id=19125
      ac8392aa
  10. 07 Jan, 2013 1 commit
  11. 06 Dec, 2012 1 commit
  12. 15 Oct, 2012 2 commits
    • Tim Cutts's avatar
      Make fake web request methods safer · 92ee5cfe
      Tim Cutts authored
      The fake methods were returning the object instance itself, rather than
      a data type compatible with what the real object does.  While this does
      not cause any bugs at this point, it could lead to unexpected
      consequences in the future; for example anything calling headers_out in
      an array context would break, even though it's a valid thing to do.
      92ee5cfe
    • Tim Cutts's avatar
      err_headers_out method for fake web request object · 4917b613
      Tim Cutts authored
      RT::Extension::ActivityReports makes a call which requires the fake web
      request object to implement this method.  [rt3 #20871]
      4917b613
  13. 14 Jun, 2012 1 commit
  14. 10 Apr, 2012 1 commit
  15. 27 Jan, 2012 1 commit
  16. 03 Jan, 2012 1 commit
  17. 26 Aug, 2011 1 commit
  18. 23 Aug, 2011 1 commit
  19. 27 May, 2011 1 commit
  20. 15 Feb, 2011 2 commits
  21. 27 Dec, 2010 1 commit
  22. 17 Dec, 2010 2 commits
  23. 16 Dec, 2010 2 commits
  24. 29 Nov, 2010 1 commit
  25. 25 Nov, 2010 2 commits
  26. 22 Nov, 2010 2 commits
  27. 19 Nov, 2010 3 commits