Skip to content
Snippets Groups Projects
  1. Oct 07, 2013
  2. Oct 06, 2013
    • Jared Hancock's avatar
      Crazy performance penalty scanning blob tables · 60fcf00c
      Jared Hancock authored
      When scanning the file_chunk table for orphaned file chunks that can be
      deleted, apparently, MySQL will read (at least part of) the blob data from
      the disk. For databases with lots of large attachments, this can take
      considerable time. Considering that it is triggered from the autocron and
      will run everytime the cron is run, the database will spend considerable
      time scanning for rows to be cleaned.
      
      This patch changes the orphan cleanup into two phases. The first will search
      just for the pk's of file chunks to be deleted. If any are found, then the
      chunks are deleted by the file_id and chunk_id, which is the primary key of
      the table.
      
      The SELECT query seems to run at least 20 times faster than the delete
      statement, and DELETEing against the primary key of the blob table should
      be the fastest possible operation. Somehow, both queries required a full
      table scan; however, because the SELECT statement is explictly only
      interested in two fields, it is more clear to the query optimizer that the
      blob data should not be scanned.
      
      References:
      http://stackoverflow.com/q/9511476
      60fcf00c
  3. Oct 04, 2013
  4. Sep 30, 2013
  5. Sep 29, 2013
  6. Sep 27, 2013
  7. Sep 26, 2013
    • Jared Hancock's avatar
      Disable Kerberos and NTLM auth for mail fetch · 8b0085dd
      Jared Hancock authored
      On some configurations of PHP and remote mail servers, Kerberos and NTLM
      challenge response authentication could be possibly attempted. This is
      essentially futile and potentially fatal for osTicket mail fetching, as the
      system is currently designed for username and password authentication only.
      
      This patch disables challenge and response authentication for PHP versions
      5.3.2 and newer, which support the fix.
      
      This patch also consistently encodes mailbox names according to the rfc 2060
      for IMAP.
      8b0085dd
  8. Sep 24, 2013
  9. Sep 23, 2013
    • Jared Hancock's avatar
      Detect attachments with Content-Type: ...; name= · be02c8d4
      Jared Hancock authored
      RFC2045, section 5.1 seems to indicate that arbitrary parameters can be
      appended to a Content-Type header specification. Some email clients seem to
      use the Content-Type header to specify an attachment without giving a
      separate Content-Disposition header normally used to signify attachments.
      
      This patch corrects attachment detection for piped emails to detect such
      emails. The patch also correctly decodes filenames specified either in the
      Content-Disposition or Content-Type headers using RFC5987, where the
      filename can be encoded using an arbitrary character set (ie, not us-ascii).
      be02c8d4
    • Jared Hancock's avatar
      Fix 1.6-* upgrade to 1.7.1 · c3349266
      Jared Hancock authored
      8e72e521 (v1.7.1.2+) introduced a bug where
      osTicket version 1.6 would not send a cookie (by calling PHP
      session_start()) for the login page. Therefore, after unpacking the 1.7.1
      source code, an upgrade would not be possible, because a login would never
      be processed correctly.
      c3349266
  10. Sep 20, 2013
  11. Sep 18, 2013
  12. Sep 13, 2013
    • Jared Hancock's avatar
      Avoid double-encoding thread titles · bd680889
      Jared Hancock authored
      This is safe now, because the title is appropriately encoded in
      class.thread.php/ThreadEntry::create()
      
      Fixes #567, #718
      bd680889
    • Jared Hancock's avatar
      Fixes cookie domain specification · eecd0b1a
      Jared Hancock authored
      if the domain given in HTTP_HOST variable happens to have a port
      specification. Technically, the port specification should not be included in
      the domain spec given in the cookie.
      
      (And for the record, that makes no sense to me, seeing as a cookie would
      otherwise be valid for all servers on any ports at a particular domain).
      eecd0b1a
  13. Sep 12, 2013
    • Jared Hancock's avatar
      Fix up ROOT_PATH, yet again · c8197915
      Jared Hancock authored
      The previous implementation did not work correctly for symlinked folders.
      The new approach uses debug_backtrace() and ROOT_DIR to determine the
      difference between ROOT_DIR and the osTicket installation path.
      
      This thing is like a turd that won't flush
      c8197915
  14. Sep 11, 2013
  15. Sep 09, 2013
    • Jared Hancock's avatar
      Forbid message loops for alert messages · 6e5c1f6a
      Jared Hancock authored
      If an alert message manages to loop back into the ticketing system, refuse
      posting to the ticket thread. Technically, the message should be marked as
      an auto-response message; however, auto-response messages should usually be
      allowed to be appended to the ticket thread.
      
      This patch will check if the From email header cites an email address that
      is a system email address (visible in the Emails section of the Admin
      Panel). If it is, the email is completely ignored.
      6e5c1f6a
    • Peter Rotich's avatar
  16. Sep 06, 2013
    • Jared Hancock's avatar
      Oops. No need to fetch attachments twice · 7aa4e6f8
      Jared Hancock authored
      7aa4e6f8
    • Jared Hancock's avatar
      Fix cookie domain for localhost · faeed43c
      Jared Hancock authored
      Web browsers don't appreciate a cookie domain without any dots. This patch
      detects the originally-requested domain for the request. If the domain does
      not contain dots (such as 'localhost' or the name of a local server on your
      network defined in your hosts file), no cookie domain is sent.
      
      The greatest symptom of this issue what the illustrious 'Invalid CSRF token'
      seen repeatedly on the scp login page. The reason is that the browser was
      rejecting the cookie from the server.
      
      Fixes #677, #672, #653
      faeed43c
    • Jared Hancock's avatar
      Fetch attachments in mail fetch · 3188aee0
      Jared Hancock authored
      This code was lost when the message-id tracking feature was implemented
      3188aee0
    • Jared Hancock's avatar
      Fix cookie domain for localhost · 8e72e521
      Jared Hancock authored
      Web browsers don't appreciate a cookie domain without any dots. This patch
      detects the originally-requested domain for the request. If the domain does
      not contain dots (such as 'localhost' or the name of a local server on your
      network defined in your hosts file), no cookie domain is sent.
      
      The greatest symptom of this issue what the illustrious 'Invalid CSRF token'
      seen repeatedly on the scp login page. The reason is that the browser was
      rejecting the cookie from the server.
      
      Fixes #677, #672, #653
      8e72e521
    • Jared Hancock's avatar
      Provide a fallback ROOT_PATH · 8d044a30
      Jared Hancock authored
      If unable to detect the root path, provide a fallback ROOT_PATH setting to
      './'. This is likely to happen if run from the commandline (like for crons)
      or if DOCUMENT_ROOT and the folder of main.inc.php seem to have nothing in
      common
      
      Fixes #704
      8d044a30
    • Jared Hancock's avatar
      f574da55
  17. Sep 05, 2013
    • Jared Hancock's avatar
      45fdfa82
    • Jared Hancock's avatar
      65c450ee
    • Jared Hancock's avatar
      Handle attachment filenames better · b4b02114
      Jared Hancock authored
      Previously, filenames saved in the database had the spaces changed for
      underbars; however, other characters (such as commas and non-ascii
      characters) presented issues with user agents downloading the attachments.
      
      This patch handles the filename encoding for two special cases -- internet
      explorer and safari, and provides the semi-standard RFC5987 method of
      encoding the filename for the remaining browsers.
      
      Attachments are no longer forced to be downloaded. It is up to the browser
      to decide if the attachment should be shown in the browser or downloaded.
      
      This patch also fixes a slight bug in the caching mechanism for downloads
      concerning the last-modified time. The date sent to the browser was not
      properly converted to GMT time, although the server claimed that it was.
      b4b02114
Loading