Skip to content
Snippets Groups Projects
  1. Jul 26, 2019
  2. Jul 25, 2019
  3. Jul 24, 2019
    • JediKev's avatar
      security: HTML File Browser Execution (Windows: Firefox/IE) · 33ed106b
      JediKev authored
      This addresses an issue reported by Aishwarya Iyer where attached HTML files
      are executed in the browser instead of forcing download in Firefox and IE
      for Windows specifically. This is caused by an incorrect
      `Content-Disposition` set in the `AttachmentFile::download` function.
      Instead of attachments having a disposition of `attachment` (which forces
      download) they have a disposition of `inline` (which displays the file
      contents in the browser). This updates the download function to use whatever
      disposition is passed (for S3 plugin), if none it defaults to `attachment`.
      In addition, this overwrites the disposition and sets it to `attachment`
      after the `$bk->sendRedirectURL()` so that S3 attachments still work and the
      issue of an attacker passing their own disposition is mitigated.
      33ed106b
    • Peter Rotich's avatar
      Merge pull request #4957 from JediKev/issue/is-formula-dotall-mode · 94d24a51
      Peter Rotich authored
      issue: is_formula Dotall Mode
      94d24a51
  4. Jul 23, 2019
    • JediKev's avatar
      issue: is_formula Dotall Mode · 992e9044
      JediKev authored
      This addresses an issue where having a new line in a standard, non-richtext
      textarea field fails on `is_formula` validation. This is due to the regex
      not running in Dotall mode, which does not match new line characters. Dotall
      mode makes the dot (`.`) character match anything _including_ new line
      characters. This adds the `s` flag to the regex so that new lines are
      properly matched.
      992e9044
  5. Jul 12, 2019
  6. Jul 11, 2019
    • JediKev's avatar
      security: CSV Formula Injection · 99818486
      JediKev authored
      This addresses a security issue discovered by Aishwarya Iyer where a User
      can change their Full Name to a windows formula and when an Agent exports a
      list of Users containing said User and opens the export file, the formula
      will be executed on their computer (if it's windows of course). This adds a
      new validator called `is_formula()` to all text fields disallowing the use
      of the following characters `= + - @` at the beginning of text. This should
      mitigate CSV Formula injections for any text field that allows user-input in
      the system. To further prevent CSV Formula injections this adds an escape
      mechanism to the Exporter that will escape any content matching the formula
      regex with a single quote (as mentioned in many posts about this subject).
      99818486
    • Peter Rotich's avatar
      Merge pull request #4946 from JediKev/xss/install-form · e65aeb11
      Peter Rotich authored
      xss: Install Form
      e65aeb11
    • Peter Rotich's avatar
      Merge pull request #4947 from JediKev/issue/rogue-closing-div-breaks-html-thread-tree · 505433f6
      Peter Rotich authored
      issue: Rogue Closing div Breaks HTML Thread Tree
      505433f6
  7. Jul 10, 2019
    • JediKev's avatar
      xss: Install Form · c3ba5b78
      JediKev authored
      This addresses an issue reported by Aishwarya Iyer where inserting `<img src
      =x onerror = prompt(1)` into any text field on the install form will execute
      in the browser after the system is installed and you log in. This is due to
      us not sanitizing the content before it’s saved in the database. This adds
      `Format::htmlchars()` to the installer to ensure the text field data is
      sanitized properly.
      c3ba5b78
    • JediKev's avatar
      issue: Rogue Closing div Breaks HTML Thread Tree · 3bb4c0a1
      JediKev authored
      This addresses an issue reported by Vincent Monier (Xenos) where posting a
      single `</div>` tag as a message or response via the UI will break the HTML
      Thread Tree view. This is due to the `html_balance()` method not cleaning
      empty div tags. This adds `'div'=>1` to the empty tag array so that any
      rogue div tag + any empty div tags are properly removed.
      3bb4c0a1
  8. Jul 09, 2019
  9. Jul 03, 2019
    • JediKev's avatar
      issue: Search Reindexing Thread Entries · bbf1010c
      JediKev authored
      This addresses an issue where `IndexOldStuff()` doesn't reindex everything
      it's supposed to. The reindex leaves out all of the Thread Entries with
      empty titles or bodies. This is due to the SQL statement that retrieves
      thread entries. In the SQL statement, we check if the sum of the Thread
      Entry Title length and the Thread Entry Body length is greater than 0. If so
      we reindex the entry, otherwise we exclude it. The problem is both
      ```LENGTH(A1.`title`)``` and ```LENGTH(A1.`body`)``` can return `NULL` and
      you cannot add `NULL` (a string) to an integer. This updates the SQL to add
      `IFNULL()` statements around the possible `NULL` values so that if `NULL` we
      typecast to integer of 0 which can be added to integers successfully.
      bbf1010c
  10. Jun 28, 2019
    • JediKev's avatar
      issue: ISO-8859-8-i Charset Issues · 4da0324b
      JediKev authored
      This addresses an issue where emails with `ISO-8859-8-i` character-sets
      appear as "(empty)" in the system. This is due to `ISO-8859-8-i` not being a
      valid character-set for `iconv()`. When you pass `ISO-8859-8-i` to `iconv()`
      you will receive an error similar to `iconv(): Wrong charset, conversion
      from 'ISO-8859-8-i' to 'UTF-8//IGNORE' is not allowed`. I don’t know why
      it's not a valid character-set for `iconv()` but the trailing `-i` is used
      to say "keep the text in logical order instead of visual order". Logical
      order just means to keep the text in true right-to-left format instead of
      transcoding the characters to left-to-right format.
      
      This adds a new case to the `Charset::normalize()` switch statement to match
      against `ISO-XXXX-X-i`. If a character set matches the criteria we will
      remove the trailing `-i` and set the charset to `ISO-XXXX-X`. This charset
      format is valid in `iconv()` which will return the correctly formatted email
      instead of "(empty)".
      4da0324b
    • Peter Rotich's avatar
      Merge pull request #4902 from JediKev/issue/account-registration-throws-errors · e4cb4e98
      Peter Rotich authored
      issue: Account Registration Throws Errors
      e4cb4e98
    • Peter Rotich's avatar
      Merge pull request #4901 from JediKev/issue/retained-deleted-listitem-errors · 14bfc4cb
      Peter Rotich authored
      issue: Retained Deleted ListItem Errors
      14bfc4cb
  11. Jun 13, 2019
    • Peter Rotich's avatar
      Remove File Type Override · 539d343d
      Peter Rotich authored
      Remove file type overwrite previously used to force downloads. This
      addresses potential XSS where an attacker could pass "image" resulting in
      the file being displayed in line.
      539d343d
  12. May 23, 2019
    • JediKev's avatar
      issue: Account Registration Throws Errors · a7205073
      JediKev authored
      This addresses issue 4898 where a User that clicks the ticket link in an
      email alert to view the ticket, in that ticket view clicks the link to
      register for an account, fills out the registration form, and clicks Create
      will throw a an "Unable to register account. See messages below." error.
      When the Users get this error there are no messages below so they can't see
      anything to fix which prevents them from creating an account. This is due to
      the email field being disabled which means the value is not sent in POST so
      the system thinks the User sent no email address which throws a hidden
      "Email field required." error. We disabled the email field to prevent an
      attacker from accessing the user’s guest login and registering the user with
      a different email (possibly his own). This sets a POST value called 'email'
      to the client's email so that the registration process acknowledges and
      validates the email allowing registration to continue.
      a7205073
  13. May 22, 2019
    • JediKev's avatar
      issue: Retained Deleted ListItem Errors · a3297a25
      JediKev authored
      This addresses an issue where New Tickets will fail for Users with a deleted
      ListItem retained in their Contact Information form. This is due to the
      system deleting the `list_id` for the ListItem so when we run
      `getFilterData()` for the User we can't find the list which causes a fatal
      error later down the line. This adds an OR statement to the
      `SelectionField::getFilterData()` method to skip said ListItems if no
      `list_id` is present.
      a3297a25
  14. May 10, 2019
  15. May 09, 2019
  16. Apr 30, 2019
  17. Apr 29, 2019
    • JediKev's avatar
      oops: .eml/.msg Missing Not Operator · ce8aadf8
      JediKev authored
      This addresses a typo where we are missing a not operator in class
      MailFetcher when checking for no `$body` in the fetched attachments. This
      adds the not operator so that the `if()` statement is properly executed and
      we correctly set a fake body when there is none.
      ce8aadf8
  18. Apr 25, 2019
    • JediKev's avatar
      cli: Package No File Permissions · 25e6c6e9
      JediKev authored
      This addresses an issue where the `package` cli module is leaving out the
      permissions on files. This causes the final ZIP archive to contain files
      without permissions meaning the files are un-usable until you restore
      permissions. This can make life difficult on people trying to install
      osTicket with minimal knowledge as they wouldn’t know what is wrong.
      
      This is due to the `setExternalAttributesName` method not shifting 16 bits
      on the file "mode" which will not translate to binary. The file "mode" is
      the inode protection mode for a file returned by the `stat()` method. It is
      essentially a decimal representation of a file's permissions. Since "mode"
      is in decimal format we need to shift by 16 bits to translate it to binary
      so the archiver understands. Once the mode is translated to binary the
      permissions are preserved.
      25e6c6e9
    • aydreeihn's avatar
      Lint Fixes · 8c878db6
      aydreeihn authored
      This commit gets rid of PHP warnings. Additionally, it updates the lint tests to be more accurate.
      8c878db6
  19. Apr 24, 2019
Loading