Skip to content
Snippets Groups Projects
  1. Apr 28, 2014
    • Jared Hancock's avatar
      storage: Avoid using `strlen` to count bytes · f15b893e
      Jared Hancock authored
      For PHP installations that have `mbstring.func_overload` enabled (set to a
      value including `2`), the `strlen` function will be overloaded to use the
      `mb_strlen` equivalent. Problematically, the internal encoding of `UTF-8`
      will be applied to all file content, which will count UTF-8 characters
      rather than bytes. This will cause the data to be saved correctly; however,
      the `size` recorded in the %file table will be recorded incorrectly.
      
      This patch allows the backend to report the size of the contents saved with
      the request and provides a failsafe mechanism which will use the mbstring
      equivalent if available, and the mbstring version is coded to use the `8bit`
      as the encoding which will prevent reading characters.
      
      References:
      https://github.com/osTicket/osTicket-1.8/issues/552
      f15b893e
  2. Apr 15, 2014
  3. Apr 14, 2014
    • Jared Hancock's avatar
      Fixup merging of email recipients · 0c32eabb
      Jared Hancock authored
      This stems from a confusing similarity between the + operator for arrays
      and array_merge() in php. Adding arrays will ignore items in the RHS where
      keys are present in the LHS. Therefore, when adding numerically indexed
      arrays together, only items on the RHS that have a key higher than the
      greatest key on the LHS will be included.
      0c32eabb
    • Jared Hancock's avatar
      f40c018d
    • Jared Hancock's avatar
      Relax detection of images for strip detection · f8b490d0
      Jared Hancock authored
      It is perfectectly fine to have an image cited in an HTML body similar to:
      
      <img width=909 height=302 src=cid:image002.jpg@01CF5426.BF5A72A0 alt=image>
      
      Which may or may not have quoted @src attribute, and may very well have an
      at sign (@) somewhere in the attribute text. The previous regular expression
      would not match such a @src attribute.
      f8b490d0
    • Jared Hancock's avatar
      Inline images in email without a 'cid:' indicator · 3c3ffbfa
      Jared Hancock authored
      It is the defacto standard to reference an inline image in an email by
      referencing the Content-ID header of the referenced attachment in the @src
      attribute of the image. For instance, `<imc src="cid:image001.png">` where
      the `cid:` scheme of the attribute indicates that the referenced image URL
      is a separate content of the email. The image attached to the email would
      have an accompanying header like: `Content-Id: <image001.png>`. However,
      some mail systems, including a certain fax to email service, do not
      correctly indicate the location of the image with the content-id URL.
      Instead, the referenced image tag would be `<img src="image001.png">`
      
      This patch addresses the issue by searching the message body for all
      references to attached content-id's in all @src attributes with or without
      the content-id URL scheme indicator. Previously, such images would not be
      displayed inline in the ticket thread.
      
      References:
      https://tools.ietf.org/html/rfc2392
      3c3ffbfa
    • Jared Hancock's avatar
      345788a9
  4. Apr 08, 2014
  5. Apr 04, 2014
  6. Apr 02, 2014
  7. Apr 01, 2014
  8. Mar 31, 2014
  9. Mar 26, 2014
  10. Mar 22, 2014
  11. Mar 19, 2014
  12. Mar 18, 2014
  13. Mar 17, 2014
  14. Mar 14, 2014
  15. Mar 13, 2014
Loading