This addresses issue 6817 where when using an OR operator in the Regular
Expression validation textbox for a Short Answer field it gets removed
without warning. This is due to a malformed Regex statement within the
`Format::strip_emoticons()` function. This simply removes the brackets
from the OR comparison as brackets are only used for range comparisons
(eg. `/[\x{2310}-\x{231F}]/u`). Additionally, this replaces the
duplicated Copyright symbol with the "masculine" version of degree to
cover both types of degree symbols. There are more but these are the
most common.
This ensures the actor's login name is of an acceptable format before
attempting authentication. This also updates `is_userid()` to accept a
new param of `$verify` that is passed through to `is_email()`.
This addresses an issue where when updating a Help Topic and having a
disabled Department set for example, the system will return a generic
error stating to address the errors below; but none are shown. This is
due to a missing error div that displays the Department errors. This
simply adds the div so Department errors are visible.
This addresses an issue where MS started adding UTF-8 BOM to beginning
of some content which causes parsing issues and errors. This removes the
UTF-8 BOM before using it in laminas to avoid parsing issues and errors.
This addresses an issue with PGP and S/MIME mail parsing where sometimes
the content is completely empty or malformed. This is due to an old PGP
block that was added back to the code after a Pear upgrade. This removes
the block to allow PGP and S/MIME mail to be parsed correctly.
This addresses an issue where having multiple Interval values for a
single Date column (like DueDate) throws a fatal error. This is due to
the system expecting the interval to be a string not an array. This adds
a cast to each place we use the interval to ensure it's a string to
avoid fatal errors.
This addresses an issue with POP OAuth2 error parsing where errors are
blank on screen. This is due to using `$matches[2]` (which doesn't
exist) vs `$matches[1]`. This updates the code to use the correct match
so that errors are correctly shown on screen.
This addresses 6873 where SVG Image uploads are failing even with strict
MIME checking disabled. This is due to the `exif_imagetype()` call that
checks an image MIME type. This method does not work well with SVGs as
it only checks the first few bytes. This adds a specific SVG check using
`mime_content_type()` that can handle SVG MIME type checks.
This adds backwards compatibility support for legacy mail servers that
don’t support SMTPUTF8 or ones that simply refuse to support it (get
with the times old man!). When the system adds an attachment or adds an
inline image to outbound mail we add the raw UTF-8 filename to the
`filename=` parameter contained within the `Content-Disposition` header.
This can be problematic with legacy mail servers or servers that refuse
to support SMTPUTF8 as non-ASCII characters contained within the
`filename=` parameter of the `Content-Disposition` header triggers
SMTPUTF8 requirement. If the server doesn’t support it but it’s required
then it bounces the mail, typically with an error message stating such.
This updates the `Message::addInlineImage()` and
`Message::addAttachment()` methods to not only provide an ASCII-safe
filename but to also utilize a new MIME Part `Rfc2231Part` (discussed
momentarily). To generate said ASCII-safe filenames for both inline
images and any attached files this adds a new method called
`Message::asciiFallback()` that converts raw UTF-8 filenames to ASCII as
well as removes any non-header safe characters. In addition, this adds a
new MIME utility namespace `osTicket\Mime` that houses a new MIME
utility called `Rfc2231Part`. This class extends `Laminas\Mime\Part` to
essentially modify the `Content-Disposition` header and tack on the
original UTF-8 filename using the `filename*=UTF-8''` parameter but
encoded with `rawurlencode()` to make it ASCII-safe.
In summary, this adds an ASCII-safe `filename=` parameter to the
`Content-Disposition` header to prevent legacy servers from triggering
SMTPUTF8 requirement whilst utilizing `Rfc2231Part` to additionally
provide an (ASCII-safe) UTF-8 `filename*=UTF-8''` parameter for modern
mail servers (preserving the original filename).
This addresses an issue where if you update the User Account
Confirmation Email template for example and it has validation errors the
system will throw a fatal error. This is due to a missing `$langs`
variable and a missing `$cfg` global. This adds the missing variable and
global back to avoid fatal errors.
This addresses an issue where Guest User sessions would quickly timeout
even though the User session was configured for say 24 hours. This was
due to a chuck of code that used `min()` to get the minimum value from
the various TTL. This removes the `min()` part so it uses the `$ttl` if
available else defaults to `$maxlife`/`SESSION_TTL`.
This addresses a vulnerability reported by Muhammad Umer Adeem
(@UmerAdeemCheema) where normal Agents can potentially view system logs.
This also addresses additional access vulns with AJAX Content.
The previous implementation used the regex `/:(\d+)/i` to remove a
single colon preceding digits. However, this approach did not handle
cases with multiple colons (e.g., "::1"), which could potentially allow
for injection attempts.
This commit updates the regex to `/:+(\d+)/` to match one or more colons
before the digits and replaces them with just the captured number. This
change ensures that all leading colons are removed, effectively
neutralizing any parameter marker injection while preserving the
intended numeric value.
This addresses an issue with iFrame logins where the site simply would
refuse to honor cross site cookies. This adds a new check to see if the
system allows iFrames. If so, it will set the `samesite` for the cookie
to `None` which allows the cookie to be sent in all contexts. If the
site does not allow iFrames it will default to `Strict` for security
reasons.
This makes the changes needed to fully support Crowdin's latest API v2.
The main changes are the endpoints and the response types. Previously
the base URL was structured like `/api/project/{project}/{command}`
however now it is structured like
`/api/v2/projects/{project_id}/{command}`. Also previously the response
types were XML whereas now they are all JSON. There are other small
changes however their is a new function added called `getBranchId()`
that retrieves the given Branch's ID (to be used in URLs and the build
stage).
This addresses an issue where Base64 encoding plain-text content leads
to raw encoded data being displayed in the mail client. This removes the
Base64 encoding from plain-text emails so the content displays properly.
To note, when you look at providers like Gmail, etc. they do not Base64
encode Plain-text nor HTML content.
This addresses issue 6647 where in certain scenarios/setups the system
throws the infamous `Excessive errors processing emails for` error. As
per the information from the referenced issue the main cause is a fatal
error where `json_decode()` is receiving an array instead of the
expected string. This adds a check on `$fieldClean[0]` to see if it's a
string and if so uses the `json_decode()` otherwise it uses itself.
This addresses issue 6772 where you can access a Canned Response with a
Department set even if you don’t have the Premade Role Permission for
the Canned Response's Department. This is due to not checking access
before displaying the Canned Response. This adds a new function called
`staffCanAccess()` to class Canned that checks to see if the Canned
Response has a Department and if so ensures the Agent has a Role in that
Department and that the Role contains the Premade Permission. This adds
a new `if()` statement that calls `staffCanAccess()` if a Canned
Response is found.
This addresses the deprecation of the `E_STRICT` constant. The upstream
error level has been removed and now the constant is being deprecated.
Since we don't support PHP 5.x any longer and this is now
deprecated/removed this fully removes the last mention of the `E_STRICT`
constant. So long and farewell my friend.
Reference:
https://www.php.net/manual/en/errorfunc.constants.php#constant.e-strict
This addresses the deprecation of an implicitly nullable parameter
followed by a mandatory parameter in the old suggested format. This
updates the old suggested format of `function name(?string $var=null,
$var2)` to the newly suggested format of `function name(?string $var,
$var2)`. This is to avoid warnings but to also avoid errors in the
future.
Reference:
https://www.php.net/manual/en/migration84.deprecated.php#migration84.deprecated.core.implicitly-nullable-parameter
This addresses an issue where having a Ticket Referred to you and one of
your Departments increases the Queue count erroneously. In the
`getTicketsVisibility()` function the system adds criteria to find
Tickets referred to the Agent and then later adds separate criteria to
find Tickets referred to the Agent’s Department(s). The problem is the
two separate criteria will make the same Ticket appear twice in the
results. To fix the issue we simply need to make the results distinct
via `ticket_id`. Since `getTicketsVisibility()` is essentially
generating an array of criteria we can’t add the distinction there.
Plus, it could be used for things other than counts. So we move on to
`applyVisibility()` where we use the criteria and add the distinction
there. To note, this function is only used in `SavedQueue::counts()` and
`SavedQueue::getTotal()` which would only affect counts; just what we
want.
This addresses an issue where when using `getTotal()` to get the total
counts for a Queue it mistakenly includes Children Tickets. This causes
a discrepancy between the number of Tickets shown within the Queue vs
the total shown for the count. Since we ignore Children Tickets within
the Queues themselves (due to them being merged into a Parent) we should
also ignore Children within the Queue Counts. This adds a new filter to
the `$query` in `getTotal()` that filters Tickets with `ticket_pid`
equal to `NULL` or Tickets with `flags` containing `Ticket::FLAG_LINKED`
(ie. it is a Link not Merge).
This addresses an issue where if you are importing Users via CSV,
one of the Users already exists in the system, their profile has a
Department Field with a current value set, and the CSV row for their
account has a Department Field value the system will fail with an error
of `Cannot access offset of type string on string`. This is due to
blindly assuming the `$value` is an array. This adds a check to see if
the value is an array, if so it will use the `$id` otherwise it defaults
to the `$value`.
This addresses osTicket/osTicket-plugins#293 where attempting to lookup
and select a User from an external source like LDAP with an umlaut in
their name causes an error of "User not found". This is because the URL
is encoded with `htmlentities()` which makes the umlaut character
unrecognizable. This wraps the lookup string with `html_entity_decode()`
so that the umlaut is preserved and lookup succeeds.
This addresses 6574 and other deprecations and warnings encountered
during testing with `error_reporting` set to `E_ALL` and both
`display_errors` and `display_startup_errors` enabled. This includes
defining optional parameters before required parameters and function
return types not matching their parent.
This addresses 6758 where enabling the ACL for Clients and attempting to
download a file as an Agent throws an Access Denied error. This adds a
check in the `check_acl` function to see if the backend is set to Client
Portal and if the current authenticated person is an Agent. If so, it
will skip the ACL check; otherwise it will enforce the check.
This is a rewrite of 6757 that updates the `symfony/process` package to
address a recent security advisory (11/2024). Both osTicket and
laminas-mail does not use this package in production (only in dev mode)
so this only updates the `require-dev` section of the main
`composer.json` file as well as the `composer.lock` file. This is so
that if anyone uses it in dev mode they will be using the latest patched
version of `symfony/process`.
Since this package is not in-use below are the specific instructions used to
update it without installing it:
```
cd include/laminas-mail/
composer require --dev --no-update symfony/process
vim composer.lock
-- Update symfony/process version to latest (v6.4.14)
-- Update the `reference` for the source and distribution to commit hash
-- Update the `time`
composer update --no-install --lock
```
This addresses an issue where the `comments` variable is not replaced in
the Ticket Transfer Alert if there is no comment provided. This adds a
ternary operator to the `comments` variable assignment to see if there
is a value. If so it will use the value if not it will default to an
empty string. This is so the variable can be replaced with nothing which
is the intended end result.
This addresses an issue where `-` characters are allowed in Field
Variable Names when they shouldn't be. Reason being is dashes are not
allowed in MySQL Column names. Since we use the Field Variable Name as
the Column name in the respective CDATA table we cannot allow the dashes
in the Variable Names.
This temporarily addresses 6661 where there are a few MariaDB warnings
after `sql_mode` changes. This only includes temporary changes via code
until we enforce defaults via SQL in the next major release. This
accomplishes the following:
- Ensures a `body` is set when creating Drafts
- Ensures a `logger` is set when adding system logs
- Ensures `updated` has a date-time set when creating a new ThreadEntry
- Ensures `staff_id`|`team_id` defaults to `0` if no object ID available
- Ensures the `lock_id` is set to `0` instead of `NULL`
Enforce Strict Mode when updating / saving OAuth2 credentials. At the
moment we force the check at the plugin level which is not ideal and
will be removed in the near future.
In addition the change include setting the correct error tag so we can
show the error message in context.
This addresses an issue where attempting to import a User with a value
for a Custom List fails to import the list item. This is due to the
parsed (JSON) value being passed to `SelectionField::parse()` which
doesn't know how to parse it. This pull updates the `if()` statement
that checks if the given value is not an array and adds
`JsonDataParser::parse($value) ?:` before the `array($value)` to see if
we can successfully parse the string. If so, it will use the parsed
array. If not, it falls back to manually converting the value into an
array.
This addresses an issue where when annotating an image and sending it,
it disappears from the final reply. This is due to REGEX that attempts
to detect inline images and determines if it should strip them or not.
This REGEX statement is greedy which means it will find as many matches
as possible. This is a problem for image annotation as one of the
classes that gets added to the image is `data-orig-annotated-image-src`.
This gets picked up by the REGEX and as a result causes the image to be
rejected since it contains a file URL instead of the expected `cid`.
This pull simply changes the first matching group to "lazy" so that it
stops on the first match. This causes the real `src` value to be picked
up and parsed which contains the expected `cid`.
This addresses an issue where attempting to export a multiselection List
Field with multiple selected items only shows the first selected item.
This is due to the Item IDs containing spaces (due to the earlier
`explode()` call) so the IDs do not match the available IDs. This adds a
`trim()` around the Item IDs so that they match appropriately.
This addresses an issue where adding a `duedate` to API request payloads
the system simply ignores it. This is due to an _old_ bit of code (1.7 -
circa 2013) that refuses the `duedate` from any source other than
`staff`. This updates the check from `strcasecmp()` to `in_array()` so
it can check for both `staff` and `api`. This will allow a `duedate` to
manually be set from Staff created Tickets as well as API created
Tickets.
In addition, this updates the `getRequestStructure()` function to change
the single `strcasecmp()` for `email` to a `switch {}`. This is so we
can check multiple types other than `email`. This adds the previous
`email` format as a case and adds two new cases for `json` and `xml`
formats. Within these two new cases `duedate`, `slaId`, and `staffId`
are added as available fields. This is so the system doesn’t throw an
`Unexpected data received in API request` error even though these fields
are valid and accepted with JSON and XML payloads.
This addresses an issue where Safari is now refusing to load inline
images stored in S3. Upon investigation it was found the code had an old
check for Safari browser when generating the content disposition
filename string. If Safari was being used it left the filename alone as
"Safari and only Safari can handle the filename as is". Well this may be
true for Safari however S3 cannot handle this. This removes the Safari
specific check and forces even Safari to UTF8 encode the filename for
the content disposition string. This allows Safari to load inline
images from S3 again. Safari still loads other images, etc. just fine as
well.
This addresses an issue reported by JensEB where the wrong remote
backend name was used in a strpos check. This updates the name from
`auth_bk` to the correct `mailbox_auth_bk`.
This updates the PHP Prerequisites to include the `iconv` extension.
Iconv methods are used for email parsing (in the pear/Mail_mimeDecode
package) as well as other places internally. This adds the extension to
the installer prerequisites as well as the system information page and
the `README.md`.
This removes a function called `Mail_mimeDecode` that was added in
`cbd78ac` (originally from pull #6681) for "backwards compatibility".
Upon investigation this is not needed; so it will be removed.
This reapplies the Memory Optimizations added with `5ae4fe6`, `c1d0b05`,
`2c00654`, `87277dd`, and `c57c22a`. This ensures larger emails are
parsed correctly and as optimal as possible. Without optimizations, the
system typically fails at parsing such large emails.
This addresses an issue where if you load the User Directory, click the
Organization tab, go back to the User Directory tab, and attempt a user
lookup via basic-search it attempts to hit the url `undefined?q=xxx`
which is obviously not valid and fails to return results. After
investigation it was found that when clicking through the tabs vs
directly loading them causes the Javascript/jQuery to load in reverse
sequence. This means core `scp/js/scp.js` code was taking precedence
over the inline-jQuery within the Users Staff Template. In most cases
this shouldn't matter however in this particular case the input selector
in the core `scp/js/scp.js` was looking for a generic
`input.basic-search` class. We use this class for all basic searches
however the ones for user lookup and organization lookpup respectively
have their own unique ID in addition that the inline-jQuery is supposed
to select. Since the core is loading after the inline in this case that
means the core takes precedence over the inline code causing wrong URL,
etc. This simply updates the core selector to have `:not([id])` so that
it doesn't try to match an iput with class of `input.basic-search` with
an ID. Tested and working with User/Org lookups and all other
basic-searches.
This addresses an issue where when viewing a Parent/Child Ticket that
also has Tasks and you first click the Tasks tab, then the Related
Tickets tab, then finally click a Related Ticket the browser redirects
to `/scp/ickets.php?=xxx` with URL Not Supported error. This is due to
reusing the class name `tasks` for the related Tickets table. This
changes the `tasks` class to `relations` so that it's unique.
This addresses an issue where sometimes mail does not have a From Address
which causes issues in `Mail_Parse::parseAddressList()`. First, this adds a
check to see if the from is set in the headers, if not we return. Next, this
adds a check to see if the From header is malformed (ie. missing a bracket),
if so it adds one. Lastly, this continues to call `parseAddressList()` as
before however this time the From should always be set.
This addresses an issue where when exporting Agents and an Agent doesn't
have a Permission or Permission lookp fails the system throws a fatal error.
This is because we try to use `array_keys()` on `null`/`false`. This
updates class Role's `getInfo()` function to return an empty array if
the `perms` are not set/null/etc.
This updates the PHP version in the System Prerequisites (used in the
installer and upgrader) from 8.0 to 8.1. Since upstream PHP dropped support
for it we will too. RIP
This addresses an issue where in PHP 8.3 our declaration of `mb_str_pad()`
conflicts with the native `mb_str_pad()`. This adds a check to see if the
function already exists or not before declaring it.
In PHP 8.3 they have deprecated the use of `get_class()` with no parameters.
Instead you should use `get_class($this)`, `self::class`, or `__CLASS__`.
This updates all calls in the code to make it 8.3 compliant. These changes
are backwards compatible with PHP 8.1-8.2.
This addresses an issue where passing a full From string (eg. `"osTicket
Alerts" <user@noemail.com>`) as the `$from` parameter for
`Mailer::sendmail()` causes a fatal laminas-mail error. This is due to the
full string being reformatted after it's already been formatted. This
adds a check for `<` and if present we will not reformat; we will
instead use the full string as-is. This also updates one of the calls
and adds a space between the display name and the actual address.
Update the mimeDecode.php file, which was originally version 1.48 from 2006/12/03 and has been maintained up to now. Currently, we are directly using version 1.5.6. Adjustments were made to the syntax while retaining the original getHeader() function.
This is to fix#6680 issue.
This fixes a casing issue in the handling of the Action header while
handling bounce notices from mail servers.
Prior to this change, no emails could be flagged as a bounce email
because the Upper-Case version of Action was used. This has been
lowercases to "action".
An accompanying unit test, tests that a bounce email is properly passed
and it's attributes are setup. I have redacted a sample DSN email as
much as I thought was necessary but am happy to re-review this fixture.
As all other header access appears to be lowercase, this just appears to
be a simple typo.
This fixes:
https://forum.osticket.com/d/104433-undelivered-mail-returned-to-sender-processing
too
A huge thank you to: Hikari Akimori from the Resonite community for
their sanity checks.
This removes the custom `prepareHeaders()` method from class Sendmail as
this functionality was added upstream which is now available with the
latest update.
This addresses an issue where if the `ticket` array key is missing in the
`$current` array it will throw a fatal error. This adds an `isset()` check
to ensure the array key exists and is set before using it.
This updates the minimum required MySQL Version from 5.0 to 5.5. We've
stated "5.5 or better" for a while but never actually enforced it in our
installer/upgrader.
This addresses issue 6573 where the `lang` URL param is not sanity checked
and throws a fatal error if it contains anything but a string. This forces
the `lang` param to a string when passing to `strtolower()` to avoid fatal
errors. The `isLanguageInstalled()` function will still behave the same way
as before by returning `false` if passed an invalid `lang` code -or- if the
`lang` code is valid just doesn't exist in the available languages.
This updates the PHP Prerequisites to include the `ctype` extension needed
for email fetching as part of the `laminas-mail` package. This adds the
extension to the installer prerequisites as well as the system information
page and the `README.md`. Lastly, this updates the installer prerequisites
wording and structure so they all match and look streamlined.
This addresses an issue where Agents cannot see Referred Tickets in their
Closed Queues. This is due to the `Staff::getTicketsVisibility()` function
blindly using the `open` state instead of looking for `closed` as well. This
updates the function to include the `closed` state in the status condition.
This ensures the referred Tickets are shown in every Queue.
This addresses an issue where using a non-english language breaks the Ticket
view page for Tickets with no Due Date, SLA with grace period longer than 41
hours, and the SLA is attached to a Schedule with working days. This is due
to mistakenly translating the day names in `getDays()` function at times we
shouldn't be. PHP only likes English day names during actual date
calculations. This adds a new method called `getTranslatedDays()` that will
return the translated day names when needed (it also caches the
translations). In addition this updates the existing `getDays()` to strictly
return the native, untranslated day names. Lastly, this updates the calls to
`getDays()` that need to be translated to `getTranslatedDays()`.
This addresses an issue where `Task::getLastRespondent()` returns the wrong
Agent leading to the wrong people receiving alerts, etc. This updates the
`Task::getLastRespondent()` function to make it limit the last respondent
search to the Task's own Thread Entries rather than searching through all
entries.
This is a rewrite of #6641. This addresses an issue where if PHP has MySQLi
Error Reporting enabled (enabled by default starting with PHP 8.1), there
are multiple configured database hosts, and one host fails to connect the
system throws a fatal error. We previously attempted to silence fatal errors
with `@` suppression however STRICT MySQLi Error Reporting bypasses this and
still throws an error. This updates the `db_connect()` and
`db_select_database()` calls in `bootstrap.php` and wraps them with a
try/catch. If either `db_connect()` or `db_select_database()` throws a fatal
exception we will catch it and set `$ferror` to the exception message. Doing
so ensures the system attempts to connect to all configured hosts without
exiting and only croaks when no hosts are reachable or the database cannot
be selected.
This addresses an issue where the current REGEX for the "position" styling
attribute is causing issues when emails contain legit text like "position:
100 degrees". This updates the REGEX to only look for one of the possible
values instead of looking for seemingly anything.
This addresses an issue where when using a Checkbox on an Email Template the
variable is replaced with `1` if checked and doesn't get replaced at all if
unchecked. This is due to the `BooleanField` class not having an `asVar()`
method so it uses the `FormField::asVar()` method which calls `to_php()`.
This method returns an integer for BooleanField which is not what we want.
This adds a new method called `asVar()` to the `BooleanField` class that
calls `toString()` which will return `Yes` if checked and `No` if unchecked.
This addresses a small issue where the Department Name is not translated
on the Task Queues. This is due to the Task values missing the
Department ID used to generate the object_hash for the translation
table. This adds the `dept_id` to the Task Values so the translations
are properly found.
This addresses a small issue where the osTicket class could not be found in
manage.php. This moves the boostrap.php include above the osTicket call to
ensure the class is loaded before use.
This addresses a small bug where `Format::viewableImages()` was using
unencoded quotes instead of encoded quotes to replace the `<img src=`
matches. This means when the content is added to a textarea’s
`draft-data-original` attribute the unencoded quotes break the attribute
and displays raw HTML content. This moves the `Format::htmlchars()` call
after the `preg_replace_callback()` so the quotes can be properly
encoded (if needed).
This addresses an issue where saving edits made to a canned response with two
or more inline images either breaks the page or causes 500 error. This is due
to incorrectly formatted array of IDs for the inline images causing further
issues with `$att->file->getId()` on render.
This adds a check in `keepOnlyFileIds()` to see if the `$value` from the array
of IDs is an array itself. If so, we will break apart the `$value` array into
`$id` (File ID) => `$value` (File Name) to match the expected format. If the
`$value` is not an array, it will use the existing format (as before). This is
important as we have two different array formats for the File IDs depending on
what method is called to generate them. We need to be able to account for both
formats. In addition, this adds the file name to the `$attachment` array in
`getAttachmentIds()` so we can save the new attachment name (if different).
Lastly, this fixes an issue where the Canned Response attachment upload field
was blindly including all attachments rather than excluding the inline images.
This addresses a small issue where when searching for a Choice/Selection
Field value using `includes` criteria it sometimes shows records it's
not supposed to. This is due to the REGEX used to find the value. Let's
say you have two different List Options:
1. ID = 2 | Value = List Item 2
2. ID = 22 | Value = List Item 22
Now, let’s say you make a search criteria of `List => Includes => List
Item 2`. The REGEX we use is `\"?2(\"|,|$)` which will essentially match
`*2` instead of just `2`. This means it will include Tickets with with
values of `List Item 22` as it contains a `2` as well.
This updates the REGEX to add `(?<![0-9])` before the ID/Key to ensure
it does not match numbers that contain this ID/Key. Instead it will have
to be an exact match of the ID/Key.
This fixes an issue where sometimes the holidays for schedules can be
empty. This adds checks to see if holidays is empty/not set in the POST
and if so we try to get the Schedule's existing Holidays and if they
don't exist we default to an empty array. This also adds a further check
to see if `$holidays` is set if not then we default to an empty array.
This adds the concept of Retry Codes so we can attempt to reconnect to
MySQL in the event of certain error codes (2006 and 1213).
2006 - MySQL server has gone away
1213 - Deadlock found when trying to get lock; try restarting
transaction
This adds code to append the offending mail headers when an Email Loop
is detected. This will provide more information on what email exactly is
causing the loop.
This addresses an issue where sometimes an Agent will add Search
criteria with `!includes` but don't add a value. This adds a check to
make sure there is a value before attempting the search. If there is no
value we simply return without executing the search to avoid errors.
This addresses an issue where sometimes the returned `$data` from the
parser can be a type other than an array. We expect the data to be an
array so to avoid issues/errors this adds a check to ensure `$data` is
an array before we use it.
This addresses an issue where sometimes attachments can sometimes not be
set in the `$data` array. This adds a check to ensure attachments key
isset in the `$data` array before attempting to use it.
This addresses an issue where inline images were being broken in FAQ
Category Notes. This ensures we call `Format::viewableImages()` on both
the Category Description and Notes to ensure they are sanitized and
properly formatted.
This addresses an issue where having more than 20 ticket statuses run
off the page when selecting ticket statuses from Changes Status action
button. This adds a check for how many status you have an if more than
20 we add styling so the list is scrollable.
This addresses an issue where if using an old database such as v1.6 ST
and attempting to upgrade you get a fatal error of
`osTicket\Session\SystemSessionHandler: must implement
osTicket\Session\AbstractSessionhandler`. This is because the
`SystemSessionHandler` class does not extend `AbstractSessionHandler`
(rightfully so). We seemingly force `AbstractSessionHandler` without
taking the `SystemSessionHandler` into account. This adds a check to see
if using `SystemSessionHandler` and if so sets `$impl` as such; allowing
the check to pass and the session to be initiated. This also updates the
capitalization of the `AbstractSessionhandler` class in two places.
This addresses an issue where when attempting to send mail from an
SmtpAccount we attempt to get the From name with `getName()` which
throws a fatal error. This updates class EmailAccount and adds a new
`getName()` method that gets the From name from the associated email
relation. This provides the needed name and prevents fatal error from
being thrown. In addition, this adds a further fail-safe where if no
name is returned we will use the email address as the name.
This updates the `include/class.i18n.php` file to fix issues with lang
codes. When building packs for languages with codes that have locales
(eg. `sv-SE`) the pack name use underscores, not dashes. This updates
the places we lookup by lang code and replaces `-` with `_` so they are
found correctly.
This updates the `css/flags.css` to correct the positioning of some
flags. This also adds `fil` code to the `include/i18n/langs.php` file to
account for Filipino language.
This updates the code to fix issues with the `Phrases-Version`,
`Language`, `Last-Revision`, and `Version` not being added properly in
the `MANIFEST.php` file on build. This is due to importing the wrong
class as well as incorrect key names. This updates the include_once
statement as well as the key names.
This is a partial rewrite of 6365. This moves the Upgrade section to the
`UPGRADING.txt` file and updates the verbiage to link to the Upgrade
Guide in the docs as well as the `UPGRADING.txt` file. In addition this
updates the recommended extensions for PHP to reflect what's shown in
Admin Panel > Dashboard > Information. Lastly, this updates various
links in the `README.md` and `UPGRADING.txt` files.
This addresses issue 6564 where `putenv()` may be disabled on some
hosts. This adds a check to make sure the function exists before calling
it to avoid fatal errors.
This updates the `README.md` file to include the newly supported PHP 8.2
as well as an update to add more verbiage to supported MySQL versions.
This also adds credit to `laminas-mail` in the OS projects listings.
This mitigates a vulnerability repoted by @endansdto where iFrame domain
can be bypassed due to bad regex. This updates the regex to ensure
proper filtering and checks.
This mitigates a vulnerability reported by @ManuelHu where files can
bypass checks if sent in the same request behind a valid file. This also
adds a space to fix an annoyance in the JS errors.
This is a two-part commit that includes a fix for inline images on
display and a patch for a possible vulnerability for Drafts. This
restructures the way we call Format::viewableImages() so that we call it
when displaying after we sanitize the data to ensure the images are not
broken. Secondly, this ensures Drafts do not skip the
`Format::htmlchars()` sanitization at all. This is a rewrite of #6511.
This updates the email included in the intial installation Ticket to
`feedback@osticket.com`. This also updates the Ticket information to
include details about the documentation site.
This addresses an issue where emails that contain only attachment(s)
fail to process correctly. This is due to there being no `parts` for
`$part`. This adds a check for `!$part->parts` and if true (no parts) we
call `getAttachments()` on just the `$part` itself.
With PHP 8.2 `glob()` now returns an empty array if all paths are
restricted instead of `false`. This updates the only check we have on
this to check for empty array instead.
This replaces the now deprecated `strftime()` with `date()`. This also
adds a TODO to class Format to replace an instance there. It will need
some refactoring though so we are leaving it out of this commit.
This addresses an issue where the Copy/Paste Import feature for Users
sometimes creates a duplicate account for an existing User. This occurs
when using a string like `User Name, email@domain.tld`, however, does
not occur when using a string like `User Name,email@domain.tld`. This is
due to the extra space after the comma as we are not trimming extra
spaces correctly. This adds `trim()` to the values before they are used
so that they correctly match existing values and avoids duplicates.
This addresses an issue where uploading a file throws an Invalid File
error even though the file is valid and there are no file restrictions.
This is due to doing `strcasecmp()` on a variable that is some times
empty. This adds a check to see if that variable has a value before
doing the comparison to avoid false positives. In addition, this adds a
new paramter called `$strict` that if true we run the mime type check.
By default `$strict` is false which skips the check. We will eventually
add a configurable setting to enable strict mime type check if preferred.
This addresses an issue where attempting to use `All` Event type in any
other language than English the export will fail. This removes the
translation method from `All` so that the English version is used for
the option's `key`. This doesn't affect the visible word as it gets
translated downstream.
This updates the email included in the intial installation Ticket to
`feedback@osticket.com`. This also updates the Ticket information to
include details about the documentation site.
This addresses an issue where emails that contain only attachment(s)
fail to process correctly. This is due to there being no `parts` for
`$part`. This adds a check for `!$part->parts` and if true (no parts) we
call `getAttachments()` on just the `$part` itself.
This mitigates a vulnerability repoted by @endansdto where iFrame domain
can be bypassed due to bad regex. This updates the regex to ensure
proper filtering and checks.
This mitigates a vulnerability reported by @ManuelHu where files can
bypass checks if sent in the same request behind a valid file. This also
adds a space to fix an annoyance in the JS errors.
This is a two-part commit that includes a fix for inline images on
display and a patch for a possible vulnerability for Drafts. This
restructures the way we call Format::viewableImages() so that we call it
when displaying after we sanitize the data to ensure the images are not
broken. Secondly, this ensures Drafts do not skip the
`Format::htmlchars()` sanitization at all. This is a rewrite of #6511.
With PHP 8.2 `glob()` now returns an empty array if all paths are
restricted instead of `false`. This updates the only check we have on
this to check for empty array instead.
This replaces the now deprecated `strftime()` with `date()`. This also
adds a TODO to class Format to replace an instance there. It will need
some refactoring though so we are leaving it out of this commit.
This removes the custom `prepareHeaders()` method from class Sendmail as
this functionality was added upstream which is now available with the
latest update.
This removes old and tired code from the login pages where we throw
`Http::response(422);` to "prevent browsers from suggesting saving the
username and password". This is no longer the case as browsers no longer
play by these rules. The only way to properly do this nowadays is to set
an attribute on the form tag to disable autocomplete. We don't want to
do this either as that would prevent password managers from autofilling
the auth info.
Throwing a 422 code prevents some setups from accepting logins due to
4XX codes being error codes in nature. Removing this code seemingly has
no negative impact whatsoever.
A short backstory, this was [originally a 401
code](a99b9ce81e)
to prevent browsers from suggesting saving the auth info. Later it was
[changed to a 422
code](772d5c59a9)
to make IE play nice.
This addresses an issue where the Copy/Paste Import feature for Users
sometimes creates a duplicate account for an existing User. This occurs
when using a string like `User Name, email@domain.tld`, however, does
not occur when using a string like `User Name,email@domain.tld`. This is
due to the extra space after the comma as we are not trimming extra
spaces correctly. This adds `trim()` to the values before they are used
so that they correctly match existing values and avoids duplicates.
This addresses an issue where inline images only used in canned
responses and saved before a draft could be generated would erroneously
be deleted by the orphan file cleanup routine. This caused the inline
images to appear broken on use as they no longer exist. This is due to a
check for a `draft_id` before creating an attachment record for each
inline file. We do not need to check for a `draft_id` as we always have
a `response` in the POST with the most current data (eg. there might be
content added before a new draft can be saved). This removes the checks
in both `create` and `update` cases so that attachment records can be
created (with `inline = 1`) to avoid being deleted by file cleanup.
This addresses an issue where we were checking strict matching when
using basic authentication. This is due to a small oversight in the smtp
save checks. This adds a line to check if auth_bk is set to oauth2
before checking strict matching.
This addresses a small annoyance where the thread entry actions dropdown
always appears below the subsequent thread entry. This can be very
annoying and even hide some of the options. This adds `z-index` of
`auto` to the `thread-entry` div so that the dropdown always appears on
top.
This addresses an issue where lint tests fails due to `getRealPath()`
not being defined. This is from SplFileObject so we just need to add a
stub to ignore it in the tests.
This mitigates a vulnerability reported by @indevi0us where XSS is
possible via the `period` parameter. This sanitizes the parameter values
before using them anywhere.
This mitigates a vulnerability reported by @indevi0us where XSS is
possible via the `q` parameter in organization lookups. This sanitizes
the parameter value before use as well as htmlchars it before adding to
JSON output.
This mitigates a vulnerability reported by @indevi0us where XSS is
possible via the parent_id parameter. This forces the parameter to an
INT so that there is no chance of XSS.
This mitigates a vulnerability reported by @edr4 where XSS is possible
via System Email. This adds sanitization to the email before
saving/displaying. This also forces the other options (topic,
department, etc.) to int so there is no chance of XSS.
This addresses an issue where when doing full Ticket edit with a
FileUpload field and you don't supply a file the form_entry_value for
the corresponding field updates to `false`. This causes an issue with IS
NULL criteria so this adds a check to see if a value is present, if not,
then we return `NULL` instead of JSON encoding a `false` string value.
This addresses an issue where some of the mPDF font files don't get
included due to the way we use the `preg_split()`. This adds the
remaining path parts to the `list()` and adds statements to update the
`$path` if such parts exist.
This addresses a small issue where when attempting to export Agents in
any Department you get a fatal error of calling non-static method
statically. This updates the export method for the Department class to
static so that exports will function and no errors are thrown.
This addresses an issue where `make-pot` command is not working
properly. This is due to PHP 8 changes that were never fully resolved.
We had to move away from the now deprecated `each()` so we switched to
`foreach()`. However, `foreach()` does not keep current position in the
iteration which we rely on for the `make-pot` command. However, you can
get around this by using `while($var = current())` and passing by
reference which keeps the current position.
This updates the Delete Token functionality to show a success/error
banner when deleting the token. If successful it will delete the Token
tab and content, load the IdP tab, and show a success banner with the
JSON content. On error it will simply show an error banner with the JSON
content.
This changes the default for Strict Matching from `false` to `true` so
that new emails are strict unless explicitly set otherwise. This also
adds some descriptive comments to the getter and setter.
This addresses some bugs found during testing. This adds a check to
`SmtpAccount::getConfig()` that ensures we have an email and
MailboxAccount before attempting to call `getConfig()` and adds
descriptive comments. This also removes the `isActive()` check from the
SmtpAccount `save()` method as we only care about if it's currently set to
active. Lastly, this changes the variable name for the email address
from `$email` to `$addr` so it doesn't conflict with the original
`$email` variable.
It's about damn time.. that we add ability to delete the OAuth2 Token.
This adds a new button to the Token tab that will allow you to delete
the current Token.
This is a rewrite of osTicket/osTicket-plugins#263 where it was
attempting to implement Strict Matching. This fully implements Strict
Matching and adds functionality to check for this when retrieving a
token and when saving SMTP with Same As Remote Mailbox. This also adds a
new disabled field to the General Settings to show what email will be
used as well as a help tip that further explains Strict Matching.
To prevent following error:
PHP Fatal error: Uncaught Error: Call to a member function getId() on bool in /.../include/class.session.php:314
Logged back trace:
PHP Fatal error: Uncaught Error: Call to a member function getId() on bool in /.../include/class.session.php:314
Stack trace:
#0 /.../include/class.session.php(336): osTicket\\Session\\AbstractSessionStorageBackend->getRecord()
#1 /.../include/class.session.php(281): osTicket\\Session\\AbstractSessionStorageBackend->update()
#2 [internal function]: osTicket\\Session\\AbstractSessionHandler->write()
#3 [internal function]: session_write_close()
This addresses an issue where using the `Does Not Have A Value` criteria
on things like Short Answer Fields shows incorrect results. In fact, it
shows all Tickets with and without values for the Field. This is due to
using an overall negative filter (`column IS NULL` or `NOT column IS NOT
NULL`) on a column from a LEFT JOIN causing the backend to return NULL
for all values in that column. This adds a new variable called
`$nullable` that is set to `false` if the `$method` is `nset`. This then
passes `$nullable` to `getOrmPath()` so it can determine wether or not
to force a normal JOIN instead of LEFT JOIN so that `xxx IS NULL`/`NOT
xxx IS NOT NULL` will return the proper results. If the search method is
not `nset` then it will use LEFT JOIN as before.
This addresses an issue where when a Queue is filtering by a specific
field the counts are incorrect. This is due to using only the
`constraints` instead of both `constraints` and `path_constraints`. This
updates the `counts()` method to include the `path_constraints` if set
so that the counts are properly calculated.
This addresses an issue where Users login, do something, and get
randomly shown the login screen. If they refresh the page it shows
them authenticated as normal again. This is due to a Session ID mismatch
in `isvalidSession()`. When `refreshSession()` calls
`regenerateSession()` it's supposed regenerate the session and update
the session ID however it updates the local ID which `refreshSession()`
later does. This updates `regenerateSession()` to where it updates the
session ID and allows `refreshSession()` to update the local ID. This
deduplicates the local ID update and corrects the ID mismatch.
This addresses an issue where Disabled Queues are still being used in
counts. This is due to grabbing any CustomQueue that has the
`FLAG_QUEUE` flag and/or having `staff_id` equal to the current Staff
member's ID. This adds another filter `Q::not(…'flags__hasbit' =>
CustomQueue::FLAG_DISABLED,` that will ensure the Queue is not Disabled
before using in counts.
This addresses an issue reported on the Forum where when a field is set
to not visible to Users it is hidden from the Staff Ticket Print PDF.
This is due to the ThreadEvent MODE that is being used (MODE_CLIENT).
This uses the User Ticket Print template instead of the Staff Ticket
Print template which hides some thread events and other data. This
updates the utilized MODE to MODE_STAFF so that the appropriate data is
printed. This also addresses an issue where if the Staff has Relative
time configured it shows in the Ticket Print which should not happen.
This adds a check for `$_REQUEST['a']` and if it's set we make sure it’s
not `print` to avoid printing relative times.
This addresses a small logic issue where we are adding Public and
Featured FAQs in the Featured sidebar when it should only be Featured
ones. This updates the ORM statement to only show FAQs that are set to
Featured and belong to a Public or Featured Category.
This addresses an issue where emails being rejected by Banlist is
causing excessive processing errors and refuses to move the mail. This
is due to our logic expecting `403` exception code for TicketDenied but
we are using `500` in `TicketApiController::createTicket()`. This
updates the `exerr()` line to use the `$errors['errno']` if it exists
otherwise default to `500`.
This addresses an issue where printing a Ticket with Tasks or printing a
Task itself will throw a fatal error of `Non-static method
DynamicFormEntry::forTask() cannot be called statically`. This updates
the `forTask()` method to be static to avoid fatal errors.
This addresses an issue where if you have more than one instance of LDAP
plugin enabled and try to lookup a User it fails with a fatal error of
`Object of class StaffLDAPAuthentication could not be converted to
string`. This is due to using `array_unique()` which can't convert
objects to strings. This updates the method and adds the `SORT_REGULAR`
flag so that it can compare without converting objects to strings.
In addition this addresses an issue where we were using static ID for
StaffLDAPAuthentication backend. We updated the plugin code to reflect
the actual Backend ID but the current AJAX regex for this doesn’t match
this format. This updates the AJAX regex to match the updated format.
When fetching a mailbox, osTicket routes fetched emails to a department based
on `To` or `Delivered-To` header entries. This allows for ability to fetch
aliased emails from one primary account and route them based on configured
system emails. On failure to match, the email (ticket) is routed to the
department of the email account being fetched.
With the email backend overhaul in v1.17 - a bug was instroduced where
unmatched emails ended up being routed to default department instead of the
department of the email being fetched.
This commit addresses the issue...
When running osTicket in a multi-node cluster setup, it makes sense to connect
to the database via a load balancer or a database proxy (assuming VIP with
failover support). It's great for redundancy - however - this adds extra time
(miliseconds) because of the extra network hop latency.
To save a few miliseconds - when osTicket (the Application) is also hosted on
the same node or container running the database proxy - then it might make
sense to attempt a local connection first before attempting via via the VIP
(sidecar pattern).
This commit adds multiple database hosts support, comma separated, when defining
DBHOST in osTicket config file (`ost-config.php`). It also adds a new _Database
Option_ to define `DBCONNECT_TIME` used to set `MYSQLI_OPT_CONNECT_TIMEOUT`.
Connection timeout is important with multiple hosts so connection attempts
(done sequencially) can timeout relatively quickly.
This addresses an issue where if a Collaborator views a Ticket via the
Check Ticket Status button in the Client Portal and then tries to repeat
the process with an additional Ticket it will redirect to login page.
This is due to when instantiating the session we use `$user->getId()`
which causes a problem when the User is a Collaborator. When
instantiating a session for a Collaborator object `getId()` returns the
Collaborator ID, not the Collaborator's User ID. This updates the call
from `getId()` to `getUserId()` which gets the correct User ID from the
Collaborator object (and others).
Prior to osTicket `v1.17.x` email fetching required and used php-imap module to
decode and parse emails, whereas locally or remotely piped emails (via API
endpoint) used a Raw Email Parser ("Mail Parser").
Using two separate backends meant duplicated code, logic and inconsistent email
processing.
Starting with osTicket `v1.17.0`, we overhauled the Email Backend to OAuth2
support and in the process we switched toxusing a unified Mail Parser for both
fetched and piped emails. To determined how the email got delivered in order to
handle errors for the interfaces accodingly, we relied on `PHP_SAP`I /
`php_sapi_name()`.
That was shortsighted because of the value of `PHP_SAPI` can be different in
the following cases;
1. Email Fetching can be triggered by autocron (Staff Activity) or by a remote
task (API)
2. `PHP_SAPI` cannot be relied on for php installations using php-fpm, php-cgi
or custom binaries for php CLI executable
3. Cron Job / Task entry "user-name" or "command path" might use separate php
executables (related to `#2`)
4. Triggering cron/php via php-fpm socket connection e.g using FastCGI Client
Since emails are fetched in batches - Email Fetching, unlike stateless API
requests, should be considered a CLI operation regardless of how it gets
trigerred, this necessary so the system can gracefully handle fetch and parse
errors.
This commit does just that and a few other minor logic / code cleanup.
~ Peter - with love!
To avoid session fixation, osTicket regenerates Session Id on-login and on
every session timeout set for the User/Agent even with activity.
This commit changes the logic to make sure that the regenerate `TIME BOMB` only
goes off on a GET request - this is necessary so we don't invalidate data
in-flight on a POST request since osTicket Forms API backend uses session_id to
generate form field names as well as CSRF token used on forms.
Emailed tickets skips user validation on purpose with the assumption that the
user has at least a valid email. The assumption can be problematic when
osTicket has issues parsing the from address due to invalid format.
To truly verify an email, osTicket uses DNS lookup by checking MX record, if
that fails it defaults to checking A / AAAA record of the email domain.
This commit handle a case where a domain doesn't have A record.
This commit adds ability to ask backend to destroy a session by session_id.
Also changes how expire routine works - passing zero ttl results in the session
being destroyed immediately.
This mitigates a vulnerability reported by legoclones on
[huntr.dev](https://huntr.dev/) where XSS can be stored/executed via a
User's `username`. If an Agent is redirected to the User Lookup AJAX
response directly it will execute the stored XSS. This adds
`Format::sanitize()` to the `username` before saving to the database so any
potential XSS is sanitized. Additionally, this adds `Format::htmlchars()` to
the `username` before displaying in the UI to help prevent code execution.
This initially targeted a particular vulnerability with the Advanced
Search Refresh URLs but subsequently evolved into unifying all Refresh
URLs. We decided to create methods that properly encode URLs to prevent
code execution and to ensure they are all uniformly created. This adds
such capabilities and updates current Refresh URL generation to the new
methods. This also adds a method `Format::http_query_string()` that will
filter the query string and remove any unwanted params. Lastly, this
removes the old and tired `Misc::currentURL()` in favor of the new
"hip" (is that what the kids say these days?) method `Http::url()`.
Skip validating the structure of email request - this is important since emails
don't necessarily have all User Information - e.g name and should be failure
resistant.
On mail parse error, osTicket typically leaves the email alone and reports it
as a fetch failure - which results in multiple fetch attempts until an admin
manually moves the email out of the Fetch Folder. Most parse errors are caused
by poorly formatted mime message (email) that failes to decode.
This commit adds ability to create a ticket even when osTicket encounters mail
parse error. The entire raw email is attached to the ticket as message/rfc822
(.eml) attachment.
As part of post-processing options, when fetching emails, osTicket can archive
(move) or delete (remove) a mail message from the server. When using mail
storage backend like IMAP - both operations requires `expunge` command to truly
commit the changes to the mail server.
That's all good and well, except Laminas Mail (our darling upstream lib)
expunges the mailbox in real-time when a message is moved or deleted. This
creates a problem for osTicket because **expunging causes message sequence
numbers to reset at the server end during the session!!** Which in turn causes
mismatch when we process the next message in the queued sequence. Additionally,
expunging on every message operation cases unnecessary traffic to the mail
server when every second counts.
To resolve the issue - until we switch to using `UIDs` - this commit simply
bypasses Laminas Mail IMAP's removeMessage function so we can skip expunging on
message move/remove operations. osTicket expunges the mailbox at the end of
fetch session.
This commit removes "to" and "subject" headers before headers are prepared and
passed to MTA. It's necessary since the headers in question are set directly
via PHP mail() function - leaving them results in duplicate headers.
This is a temp fix needed for Windows installs until we upgrade to the latest
version of Laminas Mail which already has the fix. The version we use currently
doesn't strip the headers on Windows.
This addresses a small typo (6351) where `l` was being added to each
email string for the Default MTA setting. This removes the `l` so the
emails are displayed properly.
This commit attempts to avoid errors / exceptions that cannot be managed from PHP
userspace when an SMTP object is destructed. It also adds a connection timeout
of 5 minutes so old connections can be recreated.
This addresses an issue where if the Issue Details field or any custom
FileUpload field don't have `configuration` set any file upload to such
fields will fail with `File too large` error. This is due to the
`configuration` not being set so when we check the uploaded file size to
the allowed file `size` from the field's config via `$config['size']` it
fails. This adds a check for the `size` option in the `$config` array
and if not set or set to NULL then we will default to the system setting
`Agent Maximum File Size`.
This addresses an issue where there may be no `$ticket` available which
makes the `checkStaffPerm()` check fatally fail. This adds a check for
`$ticket` before checking the permissions. If no Ticket exists then we
set `Access Denied` error.
As the name suggests this converts the `FileUploadField::isValidFile()`
method to static. This also updates the relevant calls to static format.
Lastly, this removes the check for `function_exists('exif_imagetype')` as we
now define this if it doesn't exist.
This adds a minor improvement to the `Format::searchable()` method by adding
a new param called `$length` that will allow you to pass in a specific
length to ensure the text is less than or equal to the supplied length. If
the text length is greater than the supplied length then it will return
`NULL` (ie. not searchable).
This addresses an issue where some emails contain CSS `position` attributes
that can royally mess up the Ticket View. This adds REGEX to the
`Format::safe_html()` method that will remove any `position` attributes to
avoid rendering issues. This also adds a `position` attribute to the Thread
Entry div to ensure proper rendering.
This addresses an issue where some emails have malformed headers like `From:
"User Name" <email@domain.tld` which causes issues when processing.
This adds a check for malformed headers and if malformed then it will fixup
the header to prevent processing issues.
This addresses an issue where when validating a SelectionField's typeahead
value if there is no `$entry` the check will fail. This ensures `$entry`
exists and is set before using it in the subsequent checks.
osTicket currently fetches messages in LIFO order meaning the most recent messages get
fetched first. This was intentional to avoid possible stalemate when fetched
messages are left in the inbox (Do Nothing Option). However, this can creates
out of order threading issues since subsequest replies can be fetched first.
This commits addresses the issue by changing the logic so we can fetch older
messages first (FIFO order) as long as the numbers of the emails in the folder
being fetched are less than maximum messages to process at a time.
This commit makes sure we're returning the correct result (boolean) when moving
a message. Laminas Mail (upstream) doesn't return a value when moving a message
- success is assumed unless we catch an exception.
This commit adds a try/catch to catch possible exceptions that might happen
post ticket create. This is necessary so we can isolate problematic emails from
segfaulting the entire process (fatal error) or cause it to skip expunging the
mailbox.
The commit also adds debug logging for such errors / exceptions.
This addresses an issue where if someone doesn't install the PHP `exif`
extension, subsequent calls to `exif_imagetype()` returns `undefined`
errors. This checks to see if the method is defined and if not defines it.
This commit addresses an issue where we mistakenly disabled email account
status when upgrading to 1.17.x from older versions.
The change makes sure the status is maintained based on what's set on
hashtable.
This commit adds ability for session backends to report on certain events,
allowing us to keep app logic out of the session library.
The only event supported at the moment is "onClose" - triggered right before
the session commits the session data.
osTicket renegerates session id 10 seconds after login and that's it. This
commit add a timer to regenerate session id based on user's set max idle timeout
regardless of activity. If session timeout is disabled then it defaults to
every 24 hrs.
This addresses an issue where if using a webserver that encodes URLs by
default (like NGINX) some of the AJAX URLs will not resolve. This
ensures the URL is decoded with `urldecode()` before matching and
dispatching.
This addresses an issue where the Audit Log plugin shows Ticket Views in
the Audit Logs and shows the setting as enabled even when you disable
and save via plugin config. This is due to the current
`Config::exists()` method using the config `->get()` method and checking
the return value to determine `true` or `false`. This is problematic,
especially when values can be `NULL` or `0`. This updates the
`Config::exists()` method to check if the key exists in the session, in
the config array, or in the defaults. If the key does exist then we
return `true` otherwise we return `false`.
This commit should have probably been broken into smaller commits but the
wholesale change was required since it's an overhaul of how osTicket handles
sessions.
This addresses an issue where Information and SectionBreak Fields do not
display on Ticket edit for Users and Agents. This is due to no
visibility option for Editable for these field types. Since these field
types don't have Editable visibility when we check for
`isEditableTo[Staff|Users]()` it returns false. This overwrites the two
methods for both field types so that they are visible on Edit if the
field is visible to the respective user-type (User/Agent).
This addresses a small issue where Favicons weren't appearing on the
Staff Login Page. This is due to the Staff Login Page using a different
header than other pages. This adds the Favicons to the Staff Login Page
Headers so that they appear correctly.
This addresses a small issue where we were calling `setTimestamp()`
instead of `getTimestamp()` which causes a Fatal Error. We didn't notice
this in previous versions due to pre-PHP 8 it was only a Warning not a
Fatal Error. This updates the line to call the correct method which
avoids any fatal errors.
When we do $thisstaff->getDeptAgents, we are trying to get active agents $thisstaff can assign tickets to. The query done for this groups records in the staff_dept_access table by staff_id, so when we try to do getRoles() for $thisstaff, the only role we can get from staff_dept_access is the first record for $thisstaff.
This commit unsets the dept_access relation so that it can be requeried to get all staff_dept_access records for $thisstaff.
This commit centralizes sessions init by defering it to Bootstrap:ini() -
when setup scripts needs to start an independent session (e.g cli installer)
Centralized session init is also important because, going forward, it will make it
easy to make changes in one place e.g when changing error_reporting setting
application-wide.
This commit centralizes sessions init by defering it to Bootstrap:ini() -
when setup scripts needs to start an independent session (e.g cli installer)
Centralized session init is also important because, going forward, it will make it
easy to make changes in one place e.g when changing error_reporting setting
application-wide.
osTicket support uploading your own logos as well as login backgrounds and
calls logo.php (on both panels) to fetch the image in question. Previously we
didn't care about session data so session handler was set to an inline noop
function as a way to bypass starting a "real" session. The problem with the
approach is; if osTicket is hosted behind a proxy with multiple web severs in the backend,
the proxy needs to send all requests to the same server for specific user
session. To do so session name (OSTSESSID) is used to route requests from the same session
to the same backend server.
This commit adds a noop session backend allowing us to start a session while
still ignoring data writes. Noop backend is used when DISABLE_SESSION is
defined and set to false.
This commit adds a check to make sure an Email Account has valid credentials
when determining if the account is active. It's necessary so we can detect
deleted credentials or expired refresh token in the case of accounts with
oauth2 backends.
This commit addresses an issue where outgoing email can get rejected when the
target mail server is tight-assed - requiring a valid host when saying
helo/ehlo.
We were setting the name to null which resulted in localhost being used as the
name. Now we're asking the OS to give us the proper hostname of the server -
hopefully the server admin has the correct hostname and reverse-lookup setup
correctly for better deliverability.
When configuring an email, starting with osTicket v1.17, the adminstrator can
hint to the desired encryption when using non-stantard ports by prefixing the
`hostname` with an encryption scheme e.g `tls://` or `ssl://`. Using hints is
much better and less confusing than the old ways of presenting a user with
`IMAP` and `IMAP + SSL` as protocol selections - when infact we could use the
port number, in the backend, to determined the encryption.
This commit adds support for the opposite - by allowing an admin to force
unencrypted connection even when using standard encryption ports by simply
adding `plain://` as the scheme hint.
This commit adds a routine to get Message-Id and also adds a check for an
invalid Id when trying to set a Message Id.
Please note that invalid ID are silently ignored since the upstram library
generates one.
Spoofing: When an SMTP Account **DOES NOT** allow spoofing then set the Sender
(Envelope FROM) to the account's email address and leave the Header FROM as
set
Originator: When an SMTP account send fails - we now reset the Originator /
Sender to the original From Address, incase spoofing setting changed the
Sender
* Spoofing - when an SMTP Account does NOT allow spoofing then set the Sender
(Envelope FROM) to the account address and leave the Header FROM as set.
* SetOrinator - When an SMTP send mails we now reset the Originator / Sender to the original
From Address just incase spoofing setting had changed the Sender.
First error: abstract functions can not be private. It have to be protected or public...
Second error: the pop3 login function doesn't respond anything on successful login. This will be return false in MailBoxProtocolTrait::basicAuth()
Message-Id: osTicket uses encoded message Id to thread emails on reply.
Laminas Mail, the new backend we're mangles up the Message-Id when set as a
generic header. This commits corrects the issue by using MessageId object -
making sure it is ASCII encoded.
Date: Date is auto-added upstream - so we're removing it from Mailer to
avoid double header issues - but if need be, you can overwrite it by setting
your own fake date!
This addresses issue 6291 where importing users from CSV via command
line causes a fatal error. This is due to attempting `fclose()` on a
stream that has already been closed. The CsvImporter `__descontruct()`
method already closes the stream so when we get to the end of the import
and attempt to call `fclose()` in the CLI method, it causes a fatal
error as the stream is no longer valid (as it's already been closed).
This adds a check to see if the stream is a valid resource and if so
then we close it, otherwise we skip and continue (as it's already
closed).
This commit addresses backward compatibility issue related to the data sent to
pre_save hook. Older plugins expected clean data whereas the new interface
provided to_db data which might be json formatted for example depending on the
config field database format. Now we will send the clean data to pre_save then
transform the results for database storage via the form / fields.
This commit is a temporary fix for possible Fatal Crash when file key (hash
lookup) matches more than one object on lookup. See TODO note for more
information.
This addresses an issue where if `imagecreatefromstring()` fails it
returns false (boolean) and we then pass that to `imagesx()`. This
method only accepts Gdimage (since PHP 8) so this adds a check to see if
`$image` can be set and if so we continue otherwise we skip the `if()`
completely and go straight to sending the data.
This addresses an issue where password reset is triggered even though the
user/agent doesn’t have a password or the authentication backend is
external.
This commit fixes a bug where getNotice was undefined when rendering a dynamic
form entry. It now delegates getting a notice, if any, from the form impl.
This commit adds ability to log email parse errors. This can happen if the
system fails to fetch complete raw email or when the email content is malformed
somehow.
Log last fetch timestamp on login and before processing emails so that the
mailbox can yield to other mailboxes in the fetch queue.
Also catch Throwables instead of just Exceptions
Catch possible throwables (Exceptions and Errors) from file storage backends.
This is necessary so we don't crash while trying to save a file when storage
backend is having issues or bugs. osTicket uses database as fallback storage.
This commit refactors how FROM address is set and used within the Mailer. It's
now set as EmailAddress object - making it easy to get Email and Name
separately.
We're also removing Spoofing Check when determining possible SMTP accounts to
use for outgoing emails. It's now checked while attempting to send a Message.
If the account in question doesn't allow Spoofing then the FROM header is reset
to the accounts email address.
This commit adds ability for Mailer to skip invalid email recipients when
sending out an email. A Mailer warning with the recipient info (name & email
address) is logged.
For uniformity sake EmailContact interface now requires getEmailAddress() to be
defined downstream. This was necessary because some of the objects (e.g Staff)
return a name when casted to string (__toString) and changing it will affect
variables used in email templates and possibly leak the agents email.
This addresses an issue where a wrong variable was used which caused
undefined variable errors with the built-in tests. This corrects the
variable from `$sql` to `$exec->sql`.
This addresses an issue where we were not renewing the cookie expired
time correctly when refreshing the session. This updates
`refreshSession()` to accept a `$refreshRate` defaulting to 60
(seconds). This also updates the `if()` statement from a negative to a
postive logic for better readability.
Some Plugins DO NOT or SHOULDN'T support multiple instances due design issues
or simply because of the fact that it doesn't make sense to do so.
The blacklist will be removed down the road once plugins are forced to declare
compatiple core osTicket version and if it supports multiple instances.
This adds ability and interface to auto-trigger plugins upgrade or downgrade
when there's a version mismatch on-load.
The base plugin class simply updates the version (for now) - the downstream
Plugins should implement the actual upgrade / downgrade process as needed,
especially if it creates database tables or needs to change stored config info
to match the new version format.
This addresses session issues when upgrading from versions pre-1.7. This
bypasses the DBSessionBackend if `MAJOR_VERSION` is not defined or an
upgrade is pending and the `getDBVersion()` method returns `true` to
default to using the local session storage.
This commits sets UTF-8 as the default encoding. It's necessary because - by
default Laminas Mail uses ASCII encoding - which can cause `invalid header
value` exception when an email address of the sender or a recipient has an
accented character.
Please note that individual Mine Parts set thier own encoding as needed - by
default osTicket uses base64 to encode `text/{plain/html}` parts to reduce the
overrall size of the Message - configuratable option to make `quoted-printable`
encoding an option is planned.
This commit addresses a bug where the new Mail Fetcher failed to handle Denied
Tickets (via banlist/filter) correctly. In addition, email parsing is now
delagated to Mail Parser utility class.
This commit addresees an issue where mail fetcher crashed when logging a
warning on excessive fetch errors. As part of the fix, Email AccountSetting is
now the single source of truth when it comes to Email Account information.
This addresses issue 6218 where using `include` for things like
`api.tickets.php` fails with fatal error of `Cannot declare class xxx,
becuase the name is already in use`. This changes `include` to
`include_once` so that we avoid fatal errors and the files still get
included.
This addresses some various Upgrader issues when attempting to upgrade
from an older version (eg. `v1.6` and `v1.7`). This includes catching
more exception types, making a method static, adding some variable
checks before calling `count()`, checking for session ID before setting
custom handlers in the session class, and last (but not least) a
try-catch statement around `$__db->query()` calls so that we can catch
Excpetions without exiting.
This fixes the Deprecation warnings when attempting to set INI directive
`ini_set('auto_detect_line_endings', true)`. This directive is no longer
supported so this removes the calls completely.
This addresses the Deprecation warnings when attempting to implement the
Serializable interface without defining the `__serialize()` and
`__unserialize()` methods. This updates the code for each class that
implements Serializable to define these methods and to call the original
methods we have.
This commit fixes an issue where some default data was not being inserted into the database for fresh installs:
1. Sales Department
The Sales Department was not being created because we were trying to set an sla_id before the SLA table was created.
2. Banlist
The default Filter Rule and Action for the System Banlist was not being created because the save function now calls the ORM save function, so it is no longer calling save_rules and save_actions for the installer. We also have to change the YAML to refer to the fields as w,h,v instead of what, how, value for them to be recognized correctly.
It also fixes some spacing issues in the Filter class.
This commit addresses an issue where Password Policy Plugin crashed on login
when password expiration is set to "Never Expire" and php mode set to strict.
This is because v1.17 changed how plugin instances config values are stored to match
the actual field format (using to_db), but on load - PluginConfig mistakenly
defaulted to database value when to_php returned an empty value - which is
indeed correct value when selection was empty option.
This is necessary to allow plugin instances to use different config forms as
desired depending on internal logic. For example OAuth2 plugin can have both
Authentication and Authorization instances which require slightly diffrent
fields and validation.
This commit adds ability to inject and display a warning message on dynamically
rendered forms. This is helpful when various components want to add such
warnings while not having full control of the display logic.
This updates the ticket search mechanism to check if the supplied keyword is
a number. If the keyword is a number we will only search Ticket Numbers to
improve search performance.
This addresses an issue where we are rotating the session on each login
to help prevent session fixation. However, this causes an issue when
using an External Authentication Backend such as OAuth2. This remove the
`regenerateSession()` calls from the `login()` methods and instead we
will set a time bomb that will auto regenerate the session a certain
amount of time after login. This way external auth backends will still
function properly and we can still regenerate the session.
This addresses an issue where we are not checking the Field Variable
Names with case-insensitive comparison. This causes issues as the
database doesn't care about case and sees the two variables as the same.
This hardens our variable name checks to convert existing names and the
new name(s) to lowercase for case-insensitve comparison. With this
change it will no longer allow duplicate variable names (with a
difference of case).
This addresses an issue where the Audit Plugin relies on `enable()`
being called in order to create the `_audit` table required for saving
audit data to the database. This adds the method back temporarily until
we can rewrite the plugin to fit the new standards. This also attempts
to call `enable()` on install so that the table can be created. If the
plugin doesn't have an `enable()` method it defaults to the parent class
Plugin `enable()` which just returns `true`.
This addresses an issue where we are not regenerating the session for
Staff members after they've opened a Ticket. This adds
`$thisstaff->regenerateSession()` after creating a Ticket so that the
session is regenerated.
This addresses an issue where we are calling `getId()` instead of
`getBkId()` in some places when registering and listing plugin instances. This causes
an issue if a User is auto-created via something like LDAP and the
`backend` is set to something like `ldap.client.p[id]i[id]`. When we get
available/registered backends we are not selecting the appropriate ID so
the backend is considered "not in the list" and does not let the User
authenticate. This changes all the calls to `getBkId()` to ensure we are
selecting the appropriate ID.
This addresses an issue with PHP 8.1 where on install we run a query to
see if we can select data from the ost_config table to see if there is
already an instance installed to avoid overwriting data. In PHP 8.1 this
will throw a fatal error which kills the installer. This adds a `try {}
catch() {}` statement around the call so that if it does throw an error
it continues without issues. This is what we want anyways, if the query
returns false or an error then we want to continue.
This addresses an issue where some emails don't have a To header which
causes a fatal error when parsing mail. This is due to assuming To is set
and passing it to array_unique which expects the value to be an array. This
adds a check to see if To is set and if so we call array_unique otherwise we
default to an empty array.
This addresses an issue where updating the Queue Export Column Headings
doesn't actually save the changes. This is due to using the previous heading
regardless of the headings being passed in. This adds a check for the column
heading in `$fields` and if exists we use that otherwise we default back to
the previous heading.
This commit addresses an issue where the plugin cached the config of the first
instance loaded. The change delegates config loading to the instance when side
loading on bootstrap.
With the config moved to central config it's necessary to sort, platten the
array to json before getting md5 value.
Signature is used to detect configuratuion changes.
This is necessary for fields that chance e.g PasswordField getting decrypted.
Using upstream config store can result in decoded/decrypted values being saved
by mistake.
This addresses issue 6197 where setting Help Topics sort to Manually throws
a fatal error. This is due to not checking if `$_POST['ids']` is an array
before passing it to `array_intersect()`. This adds a check to see if the
ids are an array and if not then `$diff` will be set to an empty array
(which is what `array_intersect()` returns if the arrays have no common
values).
This is useful to plugins looking for triggered backend.
This commit also adds 'id' to Auth Strike backends - needed to be successfully registered them.
This commit adds osTicket version compatibility check to plugins.
Plugins can now indicate required version of core osTicket by specifying
`ost_version` in plugin.php file.
This improves Email searching on full search. This ensures the search query
is emailish and if so searches only user emails. This improves sql query
execution time.
This addresses an issue discovered by the AppSec Research Team at Checkmarx
where the `action` attribute passes through sanitization successfully which
can be potentially harmful. In addition `<form>`, `<input>`, and `<button>`
elements can be maliciously crafted. This updates the htmLawed configuration
to deny the `action` attribute in all elements as well as denies all
`<form>`, `<input>`, and `<button>` elements.
This commit addresses possible session fixation on both agent and end user
login. Upon login users are now issued new session with the old one
invalidated.
This mitigates a vulnerability discovered by the AppSec Research Team at
Checkmarx where it's possible to update your Agent password without passing
a valid current password. This adds a check to compare the provided current
password with the actual current password to ensure they match. If they do
not match an error will be returned stating `Current password is
incorrect.`.
This mitigates a vulnerability discovered by the AppSec Research Team at
Checkmarx where it's possible to perform Stored XSS via invalid CSRF tokens
in the System Logs. This is due to not properly sanitizing the CSRF content
before saving to the database as well as not properly escaping the content
before displaying in the UI. This adds `Format::sanitize()` to the content
before saving to the database as well as `Format::htmlchars()` before
displaying.
This mitigates a vulnerability discovered by the AppSec Research Team at
Checkmarx where it's possible to perform Reflected XSS in the Agent
Directory. This was due to the `order` and `sort` URL params not being
properly escaped. This adds `Format::htmlchars()` to both params to ensure
they are properly escaped.
This is a rewrite of 6163 where we aren’t checking User/Agent status on
login and on session validation. This adds checks to the
UserAuthenticationBackend to ensure the User is active (ie. confirmed and
not administratively locked). This also adds checks to the
StaffAuthentciationBackend to ensure the Agent is active (ie. not locked).
If a User/Agent is not active they will be redirected to the login screen.
This addresses an issue where installing `1.16.x` has the Ticket Details
Form Fields disabled for every Help Topic. This is due to checking if the
Field IDs are in an empty array which obviously will return false. This
updates the declaration of `$fields` from `array()` to `null` if the array
index doesn’t exist. This also updates the `if` statement for the Field ID
checking to ensure the `$fields` variable is an array. This ensures that the
check is skipped if `$fields` is `null` avoiding erroneous disabled fields.
This addresses an issue where removing all text in Redactor in the Post
Reply box freezes the entire page (using 90% or more CPU). As a quick
workaround user jarnott from the Forum found that adding a `br` tag
between the `draft_id` input and the Post Reply `textarea` fixes the
issue. This adds the `br` tag to temporarily address the issue until
Redactor addresses the issue permanently.
This addresses issue 6159 where tables are not appearing correctly in PDFs.
This is due to mPDF config revert when upgrading mPDF. This updates the
config `ignore_table_widths` to `true` so tables appear correctly.
This commit fixes an issue where we were only filtering out Private Departments from the Primary Department options for Agents when we should have been filtering out the Disabled and Archived Departments as well. This allowed trying to save an archived/disabled Department as the Agent's primary Department which threw an error.
Another issue was that if there was an error on dept_id, we didn't display the specific error message under the field, so you wouldn't know what to correct. Additionally, the error message for role_id was under the 'Fall back to primary role' checkbox instead of the Role field.
This problem was discovered through Issue #6135
This is a rewrite of pull 6123 where it adds translation support for client
side queue column sort tooltips. This breaks apart the tooltip strings into
two parts allowing `Sort By` and the column name to be translated
separately.
This addresses an issue reported on the Forum where Fields are not honoring
the Length value. This is due to the label being set to `length` while the HTML
attribute is named `maxlength`. This adds a case for `length` that sets the
attribute name to `maxlength`.
This addresses an issue where the created date for banlist items show an
old, incorrect date. This is due to not setting a created date before saving
to the database.
This addresses an issue where starting with PHP 8.0 the `date()` method
changed the `timestamp` parameter to be nullable. If the `timestamp` is
`NULL` then it will return the output from the `time()` method. So instead
of returning a default date of `1970-01-01T00:00:00+00:00` like it used to
it returns the current date. This is obviously a problem when it comes to
datetime based Queue Columns like Last Response with no value. Since there
is no value it gets translated to the current time and displays `just now`
in the columns instead of a blank column. This updates the `date()` call to
use `0` if the `timestamp` is `NULL` so that it returns the default datetime
of `1970-01-01T00:00:00+00:00` essentially restoring previous behavior.
This addresses issue 6079 where using `1.16.x` and PHP 8.0 on certain GNU
systems (eg. Alpine, Solaris, etc.) throws a fatal error of `Undefined
constant: "GLOB_BRACE"` when loading Plugins. This is due to `GLOB_BRACE`
not being available on said GNU systems. This removes `GLOB_BRACE` from
`include/class.plugin.php` completely as it is not used anyways.
This addresses an issue reported on the Forum where the Last Message and
Last Response Data Sources are not showing the correct times. This is due to
an erroneous change made to support PHP 8.0. We added `isset()` to parts
where we are selecting array keys but didn’t add a check for the value. This
adds checks for the values to ensure we are continuing at the appropriate
times.
This addresses issue 6059 where Ticket Filter processing stops accurately
but the Thread Events are blindly added for any Filters that match the
criteria. This is due to not checking the current Filter in the iteration
for `stopOnMatch()`. This adds a check for `stopOnMatch()` and if `true` we
will break the loop.
This addresses an issue reported on the Forum where when
`Mail::parseRecipients()` is called it throws a fatal error of `Uncaught
ValueError: mb_convert_encoding(): Argument #2 ($to_encoding) must be a
valid encoding, "localhost" given`. This is due to an erroneous change when
adding PHP 8.0 support. We changed the called class from `Mail_RFC822` to
`Mail_Parse` but left the same arguments. This is obviously an issue as both
classes' methods take different arguments. This changes the called class
back to `Mail_RFC822` to stick to original functionality and updates it for
PHP 8.0 standards.
This addresses an issue reported on the Forum where exporting Tasks gives
you a fatal error. This is due to not checking if `$current` is set before
using it in `method_exists()`. This checks to make sure we have `$current`
set before using it.
This addresses an issue reported on the Forum where when adding a new Queue
Sort an error of `Uncaught TypeError: count(): Argument #1 ($value) must be
of type Countable|array, string given` is thrown. This is due to passing the
wrong arguments to the `QueueSort::update()` method. This corrects the
arguments to `$vars, $errors` to resolve the error.
This addresses an issue where when running cli tests a validation check for
`jared@` failed. This is due to switching the calling class of
`parseAddressList()` from `Mail_RFC822` to `Mail_Parse`. This reverts the
calling class to `Mail_RFC822` to fix the issue.
This addresses an issue found when running cli tests where two static
methods are using `$this`. This updates the methods to remove the use of
`$this` and updates remaining non-static calls to static.
This addresses a few issues reported on the Forum where some methods are
throwing `Deprecated: required parameter follows optional parameter` errors.
This updates the erroneous methods to match the PHP 8 standards using
explicit nullable types with defaults.
This addresses an issue where in PHP 8 you can no longer pass variables by
reference to preg_match. This moves the definition of the variable outside
the preg_match so it no longer complains.
This addresses an issue reported on the Forum where a couple of `each()`
methods slipped through the cracks. This updates all the `each()` (minus the
php_analyzer file for now) to the new PHP 8 standards.
This addresses issue 6074 where `sendUnlockEmail()` is static but cannot be
as it uses `$this`. This updates the method to non-static and updates all
calls to non-static calls.
This addresses an issue where `Auth_SASL::factory()` is being called
statically but is not static. This updates the method to static so it can be
called statically with no issues.
This addresses an issue where `Banlist::add()` and `Banlist::remove()` are
non-static methods that are being called statically. This updates the
methods to static so that they can be called statically.
This addresses an issue reported on the Forum where cloning a Template Set
gives you a fatal error of `Non-static method EmailTemplateGroup::add()
cannot be called statically`. This updates the `add()` method to static for
`EmailTemplateGroup` and `EmailTemplate` classes.
This addresses issue 6063 where TicketStatusList does not have a
`getSortModes()` method and fatal fails when loading the status list. This
was done by `__call()` via `CustomListHandler` previously but we changed
`getSortModes()` to a static method to match PHP 8 standards. We didn't
account for the fact that `__call()` cannot call a static method as it uses
`$this` context. This renames the `getSortModes()` method for `DynamicList`
to `sortModes()`, creates a new method called `getSortModes()` which returns
the self `sortModes()`, updates `dynamic-list.inc.php` to call the method
non-statically and for `DynamicList` calls `sortModes()` statically, and
removes `static` keyword from `getSortModes()` on `CustomList` interface.
This addresses a lingering `each()` error with the PEAR library. This
updates the `while(list() = each())` statement to a simple `foreach()` to
get rid of the error.
This includes further miscellaneous fixes found while running through a
basic installation. This includes calling non-static statically changes,
parameter must be of type array changes, and class not found changes.
This includes even more miscellaneous fixes found while adding PHP 8
support. This includes incorrect capitalization of a class name and removing
unnecessary include statements.
This addresses issue 6031 where the Khmer Language Flag is inaccurate. This
updates the `css/flags.css` file to adjust the pixel frame for
`.flag.flag-km`.
This addresses an issue where you cannot save a value for an Assignee field
that’s in the Item Properties of a List Item. This is due to the method used
to prepare the data for the backend as well as the format of the data when
returned from `to_database()`. This updates `to_php()` to `to_database()` to
get the appropriate data for the backend. This also updates `to_database()`
to return the JSON encoded data itself instead of in an array. Lastly, this
updates the `getChanges()` method to remove the need to account for an
array.
This addresses issues 6043 and 6053 where installing osTicket and doing a
User lookup will return a fatal error of `Unknown column 'A5.phone' in
'where clause'`. This is an indirect result of the changes we did to rebuild
CDATA tables post-installation. The issue is that we are using
`getInstance()` which returns a cached object. Changing this to always
return a new instance via `getNewInstance()` subsequently had issues with
the TicketForm not adding the Priority field. We determined this is due to
object caching in the ORM so we added `ModelInstanceManager::flushCache()`
before we rebuild the CDATA tables to clear the object cache and prevent the
reuse of old objects.
**Problem:**
In a non-rich-text setting, osTicket includes HTML elements if canned
responses are added to a response. [This problem has been discussed, for
instance, in a thread on the osTicket
forum.](https://forum.osticket.com/d/96411-agent-responses-show-html-markup)
**Background:**
The problem came in with commit a1116036af,
probably during an upgrade of the Redactor library. Since this commit, a
canned response loaded from the server always turns the response into a
rich-text response on the client side. However, the server (rightly) expects
non-rich-text content so that the response is malformatted later in this
process.
**Solution:**
The solution to fix this is quite easy. The response HTML element is
annotated the `.richtext` if it is meant to contain rich text. Hence, the
selector for Redactor can be extended with this class. Consequently, rich
text is only used if that is intended, i.e., no more malformatting with
unwanted HTML elements.
This addresses an issue where a variable name with `/` for example throws
databases errors when reindexing cdata tables. This improves the regex
validation for variable names to ensure alphanumeric characters only.
This commit allows AuthBackends (e.g via SSO) to auto-register Users
even when the registration is set to private.
The rationale is - Users already in such backends like LDAP or SAML are
already approved/registered internally.
This mitigates a vulnerability reported by Iwan where XSS is possible via
Advanced Search AJAX. This ensures the `parent_id` from the request
`is_numeric` to avoid possible XSS.
This mitigates a vulnerability reported by Luca where email recipients can
be injected via the User's Name when creating/updating a User. This adds a
check to ensure the passed value is a string. If the value is not a string
we will refuse the request.
This mitigates a vulnerability reported by haxatron on
[huntr.dev](https://huntr.dev/) where one can bypass the Domain Whitelist
and potentially store XSS via iFrame tags. This adds a new section to the
iFrame REGEX that checks for `@` and denies the iFrame if exists.
This is an extension of `d98c2d0` and addresses an issue reported by
haxatron. This ensures the `Allow External Images` setting is Disabled by
default on new installs.
This mitigates a vulnerability reported by haxtron on
[huntr.dev](https://huntr.dev/) where usernames can be discovered by the
message returned when a username is invalid. This makes it to where
regardless of if the username is correct or not it will display a message
stating `If the information provided is valid a password reset email will be
sent to the email address you have on file.`. This blocks the chance of
someone finding a valid username by brute force guessing.
This addresses 5978 where when a Filter auto-assigns an Agent, the New
Assignment Alert they receive shows the `%{comments}` variable. This is due
to `$comments` being `false` therefore it skips the variable. This adds a
check for `$comments` and if empty/false uses `''` so the variable is
replaced/removed from the final alert.
This addresses an issue where when Inline Edit was introduced it removed the
functionality for the List Item Properties popup on mouseover. This
restructures the `display()` method for DynamicListItem to display the value
with an info icon that on mouseover will display the associated List Item
Properties.
This commit fixes an issue where we were not deleting referrals when a Ticket was deleted. Now we will delete any referrals related to a thread when the thread is deleted.
This addresses an issue reported on the Forum where disabling `Fall back to
primary role on assignments` doesn’t actually save. This is due to the third
parameter passed being `false`. The third parameter is `$commit` that
determines wether or not to save it after changing. Since this was `false`
it was never committed/saved in the database. This updates the parameter to
`true` so that it gets committed/saved.
This addresses issue 5959 where `TicketThread / Last Message` and
`TicketThread / Last Response` appear twice in the Advanced Search available
Fields. This is due to the joins/relationships automatically being added to
searchable fields. In this case, searching TicketThread will search the
Parent and Child Threads so there is no need for two separate options. This
adds a new property called `searchable` (set to false) to the `child_thread`
relation in the Ticket class. In addition, this adds a check when generating
the searchable fields that skips the relation if the `searchable` property
is `false`.
When you don't use a "SLA Plan" the "Due Date" can be empty. The staff ticket view use now a "-Empty-" display value that the update popup link works.
It also fix a invalid syntax from the table cell.
This commit fixes an issue where we were double auditing the Closed event for Tickets. This should have been removed in PR #5051 in the 'Code Optimization' commit where we started automatically logging some of the audits in class.orm.php
This commit improves upon the feature by adding a 'getEventDescription' function to the 'TriggerAction' class so that we don't have to check to see if the method exists for the type of filter action.
It also ensures that an object is found that can be used within the Thread Event, and if we don't find one, we will just generalize the wording.
Ex:
Thread Event where name is found:
Set Department Filter set Department to Parent
Thread Event where Dept name is not found:
Set Department Filter set Department
This commit adds further detail to logging thread events for filters by creating a thread event for each filter action stating the filter, what it changed, and the value it was set to.
This commit adds a thread event to show which filters were applied to Tickets.
Note: If kept this way we would need a patch to update the event table and add the 'filter' event
This addresses an issue reported by Vladislav Alyohin where Users can create
a Ticket in the Client Portal and click Refresh over and over again on
success. The result is a duplicate Ticket being created (with a different
Ticket Number) for each refresh. This adds an else statement so if there is
no client or if they are no longer valid we will rotate the CSRF token. This
will create the initial Ticket and on refresh will force the User back to
the Landing Page.
This addresses 5930 where the Helptip for the Admin Password field on
Install is incorrect. The Helptip states the password has to be a minimum of
5 characters where in reality it requires a minimum of 6. This updates the
Helptip as well as the inline string from `Must be five (5) characters or
more.` to `Must be six (6) characters or more.`. In addition, this updates
the phrase `(Five characters min)` to `(Six characters min)` in
`include/class.validator.php` as well as updates the check for less than 5
characters.
This addresses an issue where when `OsticketConfig::getDBVersion()` is ran,
a `column not found` SQL Error is generated. This is due to the config table
structure being completely different from 1.7 onwards. This adds a check to
see if the `MAJOR_VERSION` constant is defined, if so, it will skip the
`OsticketConfig::getDBVersion()` call in `include/class.ostsession.php`
(thus skipping the query execution). If the constant is not defined it will
continue on and call `OsticketConfig::getDBVersion()`.
This addresses a security vulnerability reported by xxx where uploading a
malicious SVG, getting the direct file link, adding `s=1` to the end, and
visiting the link directly will render the SVG in the browser and execute
the malicious Javascript within the SVG. This adds a CSP (Content Security
Policy) header with `default-src 'self'` to the display code. When this
header is present it prevents all inline Javascript execution thus
mitigating the XSS.
This mitigates a vulnerability reported by @tieupham267 where XSS is
possible via the `REQUEST_URI` parameter on the Client Portal. This is due
to the parameter not being converted to HTML entities before attaching to
`<link>` tags. This adds `htmlspecialchars()` around the `REQUEST_URI` to
ensure the content is properly converted.
This adds an extra layer of security to Sessions where we will verify the
UserAgent string. We will check to see if the UserAgent string saved in the
database matches the current UserAgent string from the request. If the two
do not match we will destroy the session and force the affected User/Agent
to login again.
This addresses an issue where attempting to Assign a Child Ticket throws a
fatal error of `Call to a member function getReferral() on null`. This is
due to the `thread` relation not being available for Child Tickets; instead
`child_thread` is available. This updates the code to use `getThread()`
which first checks if `thread` relation exists, if not it returns the
`child_thread` relation.
This commit addresses an issue where CDATA tables got dynamically
created early in the install process, resulting in missing fields.
The change ensures CDATA tables (views) are rebuilt at the end of
install process.
This commit fixes an issue we had with forms that have been deleted that were attached to a Help Topic. If a custom form is attached to a help topic and then the form is deleted, we put a flag on the form so that existing tickets still show the fields. However, if you are creating new tickets with those help topics, the deleted form is still showing up even though it should be hidden.
A check has now been added in the getFormsForHelpTopic method to skip deleted forms when creating new Tickets.
The commit also updates the isDeletable to use the hasFlag function that was added.
This commit fixes an issue introducted by PR #5880 where we needed to split up the string of if statements checking the value and ids passed into to_php so that if we end up getting the id in one of the ifs above, we still do the priority lookup.
This addreses an issue in 3397987 where the upgrader attempts to create
cdata tables before Task form is loaded.
This commits moves the task to the end of upgrade process.
This commit addresses an issue where dynamic form field update can
trigger multiple cdata rebuld queries, resulting in database DOS or even
a cluster crash/lockup depending on the number of form entry entries.
The change makes it so CDATA tables rebuild is done on dynamic form
field update, instead of relying on users/agents to trigger the rebuild
process.
This commit fixes an issue where some template variables could not be used when using a Filter to send an email. The filter should run after the appropriate variables have been created in the ticket, and we need to set the recipient as the ticket owner within the filter action as well.
This addresses an issue where ChoicesField configuration is malformed due to
sanitization. This adds a check for `$config['html']` and if it's `false`
(not set) then we skip heavy sanitization.
This addresses an issue where editing your own Thread Entry and clicking
Save two separate times drops the attachment(s). This is due to the order of
operations in the backend where if editing your own Thread Entry we delete
the previous entry and set `$old` to the original Thread Entry (parent of
the previous entry). This causes the attachment lookup to search for the
wrong `object_id` which obviously finds no attachments. This moves the
attachment lookup before we delete the previous entry so we can search with
the appropriate ID.
This addresses a very minor issue where the draft save on EmailTest throws
an error. This is due to changes made in 5694 where `message` was removed
from `$field_list` (security reasons). This updates the name of the textarea
from `message` to `body`. This allows the `_findDraftBody()` method to find
the body successfully and continue on. This also updates every reference of
`message` to `body` in this instance.
This addresses a small issue where the links to the Release Notes were
pointing the old location in the Docs. This updates the links to point to
the Github Releases page where it shows all Release Notes for all versions.
This commit fixes an issue where a DepartmentField or PriorityField added to a Custom Form would not show up in a
Queue Column.
PriorityField:
In to_php, if the $value passed in is actually the priority_id or the $id passed in is actually the priority_id, we should use the id to get the Priority value that should be displayed, however, if the $value passed in is already the Priority value as a string, we should return that value.
DepartmentField:
A display function needed to be added for this field. If the $dept passed in is the Department name, we should return that, otherwise if the $dept isn't a Dept object, we should use the parent display function as it was doing before. Finally, if the $dept is a Dept object, we should get the Department name from that.
This commit adds functionality that will allow us to use the attrs field in the file table to determine the file location being used for the S3 Pluign.
Credit goes to @protich
This commit fixes an issue with exporting Custom Department or Custom Assignee fields. In the exports, the fields were exporting as IDs instead of the actual field value.
Custom Department Field:
In from_query, if the value is just a dept_id instead of the department name, the field should pass the display function.
Custom Assignee Field:
- In to_php, we were missing logic needed to parse cdata into an array if the value was saved as 'id,value'
Ex: t34,Team1
First, we need to make sure not to accidentally clear out this value if the JsonDataParser doesn't work.
Next, this string needs to be set to an array like this in order to render properly:
['t34'] => 'Team1'
- If there is an Assigntee type, we should use substr to remove the letter from the array key in the event that the id for the field is more than one number
Ex: t34
The type should be 't' and the id should be 34.
Using key($value)[1] would set the id to just 3
- If the value coming into AssigneeField::to_php is the staff_id, meaning the value is just a number and we are not sending a type through, we should look up and return the Staff object.
If a agent has no permissions and you will give him/her the first permission, the class Staff->updatePerms() wrote a `array_key_exists() expects parameter 2 to be array, null given` warning.
Problem is, that $permissions->perms is null. With a RolePermission->exists() function is the code easier to read an don't show the warning.
This commit fixes an issue we had with list items that began or ended with a space. If the list was being used in a Typeahead or Input field, the values couldn't be selected if they didn't match with the spaces exactly. This commit strips the leading and trailing spaces before saving the list items.
This addresses an issue where when using the variable `ticket.dept.sla` the
system throws a fatal error. This is due to the SLA's relation to Department
defined in `include/class.dept.php`. It's defined as `array('sla_id' =>
'SLA.sla_id')` which is incorrect as `SLA.sla_id` does not exist. This
updates the relation from `array('sla_id' => 'SLA.sla_id')` to
`array('sla_id' => 'SLA.id')` so that it uses the appropriate column.
This mitigates a vulnerability reported by Hieu Tran (STeam) where someone
can potentially input malicious code via the `formaction` attribute. This
adds `formaction` to HtmLawed's `deny_attribute` option so that any code
within it is stripped out.
This mitigates a vulnerability reported by Yunus AYDIN where some field
types are vulnerable to XSS via the `onerror` property. This adds `on*` to
the HtmLawed config to remove all of the `on*` properties from content. This
also updates `Format::htmlchars()` in some places to force sanitization of
the content.
This addresses an issue where if an Agent does not have access to a
Department but is the Manager of the Department and they go to mark a Ticket
as Answered/Unanswered a blank popup appears. This is due to `isManager()`
only checking the Agent’s Primary Department for Manager access. This
updates the method to accept a Department object and if one is passed we
will check this for Manager access, otherwise we will default to the Agent’s
Primary Department.
This commit fixes an issue where unlinking all Tickets from a Parent Ticket did not remove the linked flag from the Parent Ticket which caused the Parent Ticket to show up in queues as still being Linked.
This addresses Issue #5811
This commit fixes an issue with checking on choices for the DepartmentChoiceField. We were setting $this->_choices to an empty array in the getQuickFilterChoices function, so when we did the check to see if choices were set or not, they were technically already set which resulted in the quick filters for the department field always showing as none.
This commit fixes an issue where we were not checking role permissions for inline edit on Tasks. If an Agent without the role permission to Transfer Tasks tried to click the Deparment to transfer it, it popped up a blank modal and said 'Permission Denied'. Now, the Department will not have the edit link if they don't have the permission.
This commit fixes an issue with how Departments and Agents show up in queue columns. If an Agent's Visibility was set to where they could only see Depts/Agents in a Department they have access to, it became an issue if the Agent was assigned a ticket in a Department they couldn't access (queue column would be blank) or if a Ticket was assigned to an Agent's Department but was assigned to an Agent that is not in any of the Agent's Departments (queue column would be the staff_id).
As long as an Agent has access to a Ticket, they should be able to see the value of the Dept/Agents related to that Ticket.
This commit cleans up the logic for how we use the getDepartments function. We should specify publiconly vs activeonly so that they can be used individually to specify which departments we want to get: publiconly, activeonly, or both as the criteria.
This addresses an issue where the system throws a fatal error of `Fatal
error: Uncaught Error: Call to a member function getDefaultDeptId() on null`
when doing a fresh installation. This was introduced with 5777 and is due to
trying get the default Department's ID from the system config when it's not
available. This adds a check for `$cfg` before calling it to ensure no fatal
errors are thrown.
This addresses an issue where choosing a Report Timeframe in the Dashboard
and clicking Refresh defaults the date to 2020 (yikes, please don't make us
relive it). In addition, the CSVs exported from the selected time periods
are blank. This is due to a date formatting issue in
`OverviewReport::getStartDate()`. This updates the replacement format from
`array('yy', 'yyyy', 'mm')` to `array('y', 'yy', 'mm')`.
This addresses a small issue reported on the Forum where when using the
`%{task.last_update}` variable in the Task Email Templates you receive a
fatal error of `Uncaught OrmException: Task: last_update: Field not defined
in`. This is due to the variable pulling data from `last_udpate` whilst not
having a column called `last_update` in the `ost_task` table. This updates
the variable to pull data from `updated` as this is the correct column to
use in the `ost_task` table.
This commit fixes an issue introduced with PR #5755 where we just echo the status of the Default Department so that you don't have the option to disable/archive it. When we update a Department, if $vars['flags'] isn't present, we clear out the flags to 0 and then set them according to the other vars set. Since we are just echoing the status name for the default department, $vars['status'] is NULL, so when you save the department, it ends up being disabled (we can't put the flag back). So if we're updating the default department, we need to confirm that it is the default and then manually set $vars['status'] to 'active' so that the flag is set correctly.
This addresses an issue where exporting large datasets (eg. 100,000+ Closed
Tickets) gives you a blank CSV once complete. This is due to PHP running out
of memory which results in no data being written to the CSV at all. This
sets the `QuerySet::OPT_NOCACHE` option to `true` so the result sets are
not stored in memory. Essentially, storing large result sets in memory is no
bueno.
This addresses issue 5741 where when logged in as an Agent and visiting
`scp/login.php` directly it does not redirect you to the Ticket Queues,
instead it shows the login modal. This adds a check to `scp/login.php` to
see if there is a valid Agent Session and if so we redirect to the Ticket
Queues.
This addresses an issue where Draft saving for the Post a Reply box on the
Client Portal returns the error `Draft body not found in request`. This is
due to using the generic name of `message` instead of the hashed Form name.
This updates the code to set the hashed Form name using
`$messageField->getFormName()`.
This commit finishes fixing an issue we had with disabling or archiving a Department that is assigned to an Email. At one time, we were setting the Department in the Email to the default Department if an Email's Department was disabled or archived. Part of this was removed in #4588. If we are going to leave the Department in the Email, we need to make sure that Tickets fetched from that email are not assigned to the Disabled/Archived Department. This commit will check the deptId that comes in and if the Department is not active, the Ticket will be assigned to the default Department.
It also makes it so that you cannot change the status of the Default Department to Archived or Disabled. Rather than showing up as a selection, we will just show the Department's status.
This addresses a small issue where Agents were not sorted alphabetically
when Assigning/Re-Assigning a Ticket or Task. This is especially frustrating
when you have an enormous list of Agents. This adds `nsort()` to
`getDeptAgents()` so we can sort the Agents by the system's Name Format.
This is a rewrite of 5733 that addresses issue 3884 where `imap_fetchbody()`
is not sufficient with some emails. This updates `MailFetcher::getPart()` to
check the MIME part's disposition and part number, if the disposition is
`inline` and the part number is `1` then we will use `imap_body()` instead.
This addresses a vulnerability reported by Daniel Treffenstädt (MuonPi Team)
where any User can get access to any Parent Ticket by ID (not Number) even
if they don't have access to the Parent or any Children. This is due to
checking if the ticket is a parent and is merged (not linked) without
checking for access to the children. This updates the check to grab all
children and check the User's access to each. If the User has access to one
of the children they are allowed access to the Parent, however if they do
not have access to one of the children they are denied access.
This addresses an issue where the `editor_spacing` was being applied to
emails and web created tickets. This updates the code to check for an Agent
or User session and if exists we will run `editor_spacing`; otherwise we
will not.
This commit fixes an issue where if a Collaborator does a reply all to a Ticket and the reply includes the Ticket Owner as well as a new Collaborator, the new Collaborator was not added because of the error 'Ticket Owner cannot be a Collaborator' not being cleared out.
This commit addresses a bug where ticket reply is not sent to ticket
owner on a ticket with disabled collaborators or when ticket owner is
the only selected recipient.
This fixes a small typo in the Change User Confirmation Popup. This updates
`will longer have access to the ticket` to `will no longer have access to
the ticket`.
This addresses an issue where creating a Task from a Ticket does not save
the Task Description. This is due to a field name mismatch. This adds
`$desc->getClean()` to `$vars['description']` so we have the field name and
value ready for `TaskThread::addDescription()`.
This commit adds to the latest database task. We need to see if the event table has the login, logout, message, and note events, and if a database does not, we need to add them to be used with the audit plugin.
This addresses an issue where the Task Description is missing when creating
new Tasks. This is due to a field name mismatch when 5694 was applied. This
gets the clean value to ensure the content is saved.
This addresses a small issue introduced with 5684 where Drafts do not save
when creating a New Ticket via Staff/Client side. This is due to a field
name mismatch in `include/ajax.draft.php`. We are expecting `message` but we
get the hashed name instead. This addresses another issue where Drafts do
not save when creating a New Task. We are expecting `description` but we get
the hashed name instead. This adds the hashed names to the array of possible
fields which allows the system to find the Draft bodies and save the Drafts
successfully.
This addresses a small annoyance where the logo overlaps the date-timestamp
and looks ugly for bigger logos. This adds a blank line between the two so
the formatting looks nice again, no matter what size it is.
This commit addresses Issue #5663 where there was a default selection option in the list of Email Templates that would display empty template fields that could not be saved.
This commit makes sure that we always have at least 1 Public and Active Help Topic
Mass Process:
- Do not allow deletion of all Topics
- Do not allow archiving/disabling all Topics
- Allow changing Topics from Disabled to Archived and vice versa
Note: If you try to archive, disable, or delete all Topics OR all Active Topics at once, it will throw the error that at least 1 topic must be active.
Topic Update:
- Do not allow changing Topic to Private if it's the only one that's Public
- Do not allow archiving/disabling if it's the only active Topic
- Allow changing Topics from Disabled to Archived and vice versa
It also gets rid of code we had in place in the Client Portal that would put a 'General Inquiry' Topic in the list if all Topics had been deleted. It didn't have an id to get a Topic form, so it still wouldn't allow for Ticket creation.
This commit addresses an issue introduced by 133362db where internal
forms failed to load values on POST. The change limits forcing
psudo-ramdom name just on dynamic forms.
This addresses an issue where if using Double Spacing in Redactor and you
put 2 or more lines in between paragraphs, the final content shows single
spacing formatting. This is due to Redactor using `<p></p>` for the double
spaced new lines and HTMLawed does not like that. This adds a new Format
function called `editor_spacing()` that uses simple regex to find and
replace `<p></p>` with `<p></br></p>` to ensure the formatting stays as
typed.
This commit fixes an issue where the task needed in order to add the 2FA Email template to the database for upgrades was omitted from the codebase.
The new template needed to be added to fresh installs as well.
osTicket provides ability to add ticket access link that can auto-login
users (if auth codes feature is enable), but the auth code is not added
when a ticket has collaborators. This is on purpose to avoid access
leak, because one email is sent to all recipients. As workaround, a user
can request ticket Access Link, individually, but the system still
assumed that multiple recipients are getting the link based on number of
collaborators on the ticket - meaning auth code is not added.
This commit addresses the issue by making sure Access Link requests
bypass collaborators check.
This commit adds SECRET_SALT as part of the items to use to generate
pseudo-random id for form field names. This is necessary to make sure
the name is not guessable since the salt is server-side secret.
osTicket uses pseudo-random names, based on user session, for form
fields when rendering input fields. This was done to ward off bot
attacks via web forms, but the backend failed to enforce strict name
check when sourcing the data.
This commit forces field widgets to source data based on the expected
form field name as opposed to all possible names.
This improves the parsing for external inline image URLs to better detect
path extensions. This uses `parse_url()` instead of
`preg_match()`/`explode()` to get the true URL path extension.
This fixes an issue introduced with the new Visibility Permissions. It did not account for the possibility that Users may be able to view a Custom Department field. In that event, we must make sure we can get active Departments that should show up as choices in custom Dept fields.
This commit fixes an issue where we needed to make sure to put a default delimiter for Ticekt exports. If no delimiter is specified, the deault delimiter will default to the delimiter for their locale.
This updates how the autocomplete attribute is set so we can allow specific
autocomplete values for individual fields. Before these changes
`autocomplete` would be either `on` or `off` only. This also updates old
`autocomplete=OFF` references to `autocomplete="off"`.
This commit fixes an issue we had with changing the delimiter when exporting Tickets as a CSV. In order to save the delimiter to the Agent's session, we needed to match the input field name of 'csv-delimiter' rather than just 'delimiter'. This just makes it so that if the Agent has to do another export, they won't have to reset the delimiter again. Also, in order to correctly pass the delimiter to the options of the CsvExporter class, the delimiter needed to be added to the options array before constructing the new exporter.
This commit makes sure that we have a clean array for filtered topics so that disabled/archived help topics are correctly handled in the returned selection.
This commit makes it so that FAQs that are associated with Help Topics that are associated with Departments an Agent does not have access to are hidden. It also ensures that an Agent cannot create an FAQ associated with a Help Topic that they do not have access to based on the Help Topic's Department.
This commit makes it so that Help Topics are hidden from the Agent Panel if they are assigned a Department an Agent does not have access to and the Agent does not have the 'Ability to see all Departments' permission checked.
If a Help Topic is Public, it will be shown in the Agent Panel.
If a Parent Help Topic is Private and assigned a Department an Agent does not have access to, we hide both the Parent and Children Help Topics.
If a Help Topic is not assigned a Department at all, it is shown throughout the Agent Panel.
Help Topics are filtered for:
- Inline Ticket Edit
- Ticket Edit
- Ticket Open
- Advanced Search
- Quick Filters
- Dashboard
This commit updates existing staff members so that they will still be able to see departments and agents within the agent panel the same way they are used to seeing them. This is done during the upgrade within a task.
This commit makes it so that the Agent and Department visibility permission is checked by default on fresh installs and newly created Agents unless otherwise specified.
This commit fixes an issue where quick filters for the AssigneeField class would not work because we were returning an array of AgentsName + Team name strings which did not sanitize correctly in htmlchars.
This commit gives us a way to determine if we should filter choices for setting field criteria. We need this to be optional because we use the same method for getting criteria choices in the Agent and Admin Panel, and for the Agent panel, we need to filter the choices based on the Agent's permission to view all Agents and Departments.
If Criteria are being set in the Admin Panel, all choices should be shown regardless of an Agents permissions.
filterVisibility needs to be applied for the following:
- AgentSelectionField
- DepartmentManagerSelectionField
- AssigneeChoiceField
- DepartmentField
- DepartmentChoiceField
This commit checks if the Agent has permission to see all Agents, and if they don't, only show Agents that are in Departments they have access to. This covers the following:
- Queue Assign Mass Process
- Ticket open Assign
- Ticket View assign
- Ticket Inline Edit Assign
- Ticket Refer
- Assigned Staff Quick Filter
- Assignee Quick Filter
- Department Manager Quick Filter
It also limits Agents shown in the Agent Directory based on the Agent permission checkbox as well as the Departments shown in the Department filter of the Agent Directory.
This commit fixes a bug where we did not accurately check individual Roles for Departments an Agent could access to determine if they could manage that particular Canned Response.
Now, we check to see if the Agent has a Role that can manage Canned Responses at all to determine if Canned Responses show up in the Knowledge Base.
Additionally, we filter Canned Responses shown based on the Role permissions of the Agent's Departments (Primary and Extended)
This commit allows us to determine if only public Departments should be returned or all Departments regardless of anything else. We need this for Agents that can see all Departments and search all Tickets
This commit checks to see if the Agent has permission to see all Departments, and if they don't, show only their Departments in forms that include a DepartmentField. This covers the following:
- Ticket Transfers
- Task Transfers
- Ticket Referrals
- Task Creation
Standard Forms:
- Ticket Creation
This commit adds the following checkboxes to Admin Panel | Agents | Choose an Agent | Permissions | Miscellaneous:
- Agent — Ability to see Agents in all Departments
- Department — Ability to see all Departments
This commit makes it so that Agents can only create Canned Responses for Departments they can access or Canned Responses that will show up for all Departments.
This commit filters Canned Responses so that Agents can only see Canned Responses for Departments they can access (Primary or Extended Access) or Canned Responses assigned to all Departments.
This addresses an issue where I forgot to recheck the hash after making
changes to installer. This updates the schema signature to the correct hash
so the upgrader can continue.
This addresses an issue where we've never added the `version` column to any
of the upgrade patches so if someone were to upgrade from pre-1.8, they will
not have the `version` column and they will not be able to install plugins.
This adds a prepared statement to check if the column already exists, if it
does not exists we will add the column. We have to use a prepared statement
as unfortunately MySQL doesn’t have the concept of `ADD COLUMN IF NOT
EXISTS` like MariaDB does.
This addresses an issue where the Task Title field allows any Admin to
remove the View and Required perms for Agents even though this field should
be Viewable and Required. This adds SQL so we can see if the
`FLAG_AGENT_REQUIRED`, `FLAG_AGENT_VIEW`, `FLAG_MASK_REQUIRE` and
`FLAG_MASK_VIEW` flags already exists, if not, we will add them to ensure
the field is Viewable and Required for Agents and to ensure Admins cannot
change this behavior for both perms. This also addresses an issue where the
Task Description field allows any Admin to remove the View perms for Agents
even though this field should always be Viewable. This adds SQL so we can
see if the `FLAG_AGENT_VIEW` and `FLAG_MASK_VIEW` flags already exists, if
not, we will add them to ensure the field is Viewable to Agents and to
ensure Admins cannot change this behavior.
This commit fixes an issue we had with Auto Referrals. If a Ticket had been transfered/responded to by 3 or more departments and a user sent in an email response to one of the transferred departments (not including the original or current department), we created an auto referral for that department which could potentially give agents to access they should not have access to.
A new column, email_id, has been added to the thread_entry_email table so that we can see which system email each thread entry has been fetched from.
This commit also adds the event (EVENT_TABLE) relationship to the ThreadEvents (THREAD_EVENT_TABLE) class.
An index for ticket_pid on the ticket table has been added.
This commit fixes an issue with the getChoices method for the new SLAChoiceField class. It needed the $options variable to be added so that it would match the parent class.
This addresses an issue where a User updates a Ticket that is assigned but
no alert is sent to the Assigned Agent/Team. This is due to
`getNumMembersForAlerts()` that returns the number of members that can
receive alerts for the Department. This method returns `0` if there are no
Primary Members and the Department Alert settings are set to "Department
members only" which causes the system to return before we send the New
Message alert. This method is not necessary for New Message Alerts as we
only alert the Last Respondent, Assigned Agent/Team, Department Manager,
and/or Org Account Manager. This removes the method from
`Ticket::postMessage()` so that we continue to check for recipients and send
the alerts.
Check to make sure client registration is enabled before attempting to
auto register clients on client create request.
This is important to prevent auth plugins from auto registering clients
without checking config settings.
This addresses an issue reported on the Forum where when using a Custom
REGEX Validator like `/^[0]\d{6}$/iu` and someone inserts a value like
`0000000` the REGEX will fail. This is due to a check where we use the
equals operator (`==`) to check if the value is equal to `0` and if so we
change the value to `0`. This is a problem for values such as `0000000`
as technically `0000000` is equal to `0`. This updates the equals comparison
operator to the identical comparison operator to ensure that only values
that are identical to `0 (string)` are changed to `0`.
This addresses three issues, the first of which is 5629 where running `$ php
manage.php` throws the error `Cannot declare class Exporter, because the
name is already in use`. The second issue is when addressing the declare
error you receive the error `Uncaught Error: Call to a member function
query() on null`. The last issue is when running `$ php manage.php export`
we receive the warnings `GROUP_TABLE: Cannot export table with no fields`
and `ost_timezone: Cannot export table with no fields`. This addresses the
first issue by renaming the Exporter class used in the CLI from `Exporter`
to `CliExporter` and updating all references to the class. This addresses
the second issue by using `Bootstrap::connect();` to ensure we have a
database connection before calling the Exporter. This addresses the last
issue by removing the references to `GROUP_TABLE` and `TIMEZONE_TABLE` in
the DatabaseExporter class. These tables are not used any longer so it’s
okay to remove the references.
This addresses a list of issues with Custom Assignee Fields:
- The current value is not shown as selected when updating the field
- The Thread Events do not show the changes
- Custom Columns do not show the current values
- Advanced Search with `includes` and `does not include` criteria does not
find proper results
- Exports do not show the current values
- Template Variables do not show the proper values
This overhauls the AssigneeField class to make it like an independent Custom
Field. This adds new methods such as `getChoice()`, `getKeys()`, `asVar()`,
`getChanges`, and `whatChanged()` to work with AssigneeField specific data
instead of relying on the ChoiceField class. This also updates methods like
`getWidget()`, `display()`, `getValue()`, `to_php()`, and `to_database()` to
ensure all methods work with a unified data format (JSON/Array).
- Use get2FAConfig to check if 2FA backend is verified. This eliminates the is2FAConfigured function
- Check to make sure staff and staff is admin before allowing an agent to reset another agent's 2FA
- Only reset the default2fa when resetting 2FA (leave the configuration)
- Make sure there is an id before trying to call enable2fa
- Change login 'Loading' wheel to 'Verifying'
This addresses an issue where if an Agent never finishes registering their
account via the link in the Registration Email and tries to reset their
password, the system says `Unable to reset password. Contact your
administrator`. This is due to no password being set in the first place; we
cannot reset a password that doesn't exist. This adds a check for the
Agent's password when requesting password reset and if none set we will
resend the Registration Email. This will ensure the Agent can set a password
and login successfully.
This addresses an issue where the Select2 upgrade apparently changed the way
you get data from the selection. This updates the call to get data from
`data = $sel.data();` to `data = select.select2('data');`.
This addresses an issue caused by `d98c2d0` where local inline images are
stripped from the thread entries. This adds a check for the `cid` tag and if
exists we know it’s a local image and we will allow it.
This mitigates an XSS vulnerability reported by [The NAVEX
Project](https://sisl.lab.uic.edu/projects/chess/) where if an attachment is
uploaded via Draft AJAX, the filename stored/returned in the response is not
sanitized. This updates `DraftAjaxAPI::_uploadInlineImage()` to sanitize the
filename before it's returned in the JSON encoded response. This also
updates `AttachmentFile::format()` to sanitize the filename before saving to
the backend. In addition this forces the `application/json` Content-Type on
all AJAX responses that return strictly JSON; this adds another layer of
protection.
This mitigates an SSRF security vulnerability reported by [Talat
Mehmood](https://twitter.com/Blackbatsecuri1) where we do not check if the
src URL for external inline images contain a valid image extension when
displaying. This means if someone puts something like `<img
src="mymalicioussite.com/badscript.js">` in the body of their message, when
someone clicks Show Images or when the ticket is printed the server will
call the src URL to get the "image" data for display. This is a problem as
this could load malicious code/scripts in the browser. This adds a new
setting called `Allow External Images` and if Disabled we will not allow any
external images in Threads. If this setting is Enabled (default), we will
only allow `<img>` src URLs with valid image extensions
(`png`,`jpg`,`jpeg`,`gif`).
This addresses an issue where we are not sanitizing the Internal Notes when
adding a new Banlist item. This adds a check for `$extra['notes']` and if
exists we will sanitize the content before it is saved. This will ensure no
malicious content is saved in the database.
This addresses a vulnerability reported by heinhtetaung where Internal Note
contents are not correctly sanitized if errors are returned. This adds
`true` as the second argument to `Format::htmlchars()` so that all content
is sanitized properly. In some cases however we cannot blanket sanitize all
the content as Inline Images, etc. tend to get obfuscated. So in those cases
this adds `Format::sanitize()` to the Internal Notes directly.
This commit fixes issues we had with the display of Thread Events when updating multiple fields on a Ticket. On getChanges, we need to do to_database before we compare the new and old values for Choice Fields.
This commit reverts two changes that were made that dealt with the fields shown when editing Tickets based on the Ticket's Help Topic. Some changes will need to be made to how we save fields before these changes should be redone.
This is a rewrite of 5519 and addresses issue 5020 where in some cases,
using IMAP/POP without SSL fails because class MailFetcher is not disabling
start-TLS. This adds a new if statement to check if the encryption method is
SSL if not, we will add `/notls` to the server string to disable start-TLS.
This upgrades Redactor from 3.4.1 to 3.4.2 so that we are utilizing the
latest code. This addresses a few security issues with upstream Redactor as
well as provides a few bug fixes and improvements.
This addresses an issue where having a Field that is Disabled by Help Topic
and has a Default Value appears in the Ticket Header in the Client Portal.
This is due to the system not checking for Disabled Fields per Help Topic,
rather just checking for any entries with values. This adds a check to see
if any Fields are Disabled by Help Topic, if so, we will exclude them from
the Ticket Header in the Client Portal. This adds a new method called
`getDisabledFieldsIds()` that retrieves an array of Form ID and disabled
Field IDs (eg. `array(form_id => array(disabled_field_ids))`).
This addresses an issue where Tickets that get assigned the System Default
Help Topic (mainly emails) have Disabled Fields (disabled by Help Topic)
appear in the Client Portal on Edit. This is due to not running through the
Disabling of Fields for the Default Help Topic. This moves the section to
track Disabled Fields to a new method called `trackDisabledFields()` in
class Topic that can be reused. This also adds a check for the Default Help
Topic and if set, we will run through the new method.
This commit controls when we run certain types of filters. If we are sending out an email, we want those filter actions to run after the ticket is created in case template variables are used. All other types of filter actions can run before the ticket is created.
This commit fixes an issue where you could not use template variables when using the 'Send an Email' filter action. All variables would just display as 'Array'.
We needed to pass the Ticket object to FA_SendEmail::apply however, we were running the filters before the Ticket object was created. To fix this, we can add the Ticket object to vars and run the filterTicketData function again after the Ticket is created and only apply the send email filter action if the Ticket object is found.
- Fix error: array_reduce() expects parameter 1 to be array, null given
- On Help Topic forms, the only fields that should be unchecked in the 'Enable' column are the fields that the Admin specifically unchecked. We don't need the fields that are disabled from Manage Forms to display as unchecked when viewing the Help Topic form because if you save the Help Topic form with them unchecked and then go enable the fields in Manage Forms, the fields will still be disabled in the Help Topic form which may not be what the Admin would expect to happen. They remain disabled in the Help Topic form because they end up being added to the disabled array in the extra column of the Help Topic form.
This addresses an issue where there is a missing parentheses in an upgrade
task. This is due to me 3heading the commit and forgetting to run the lint
tests so the missing parentheses was not revealed. This adds the missing
parentheses so the lint tests pass and there are no PHP errors/warnings.
This commit fixes an issue where attachments were not being added if you tried to create a Task and populate a custom File Upload field. getClean() would return an empty array, so there was no information that could be used to create the attachment record.
This addresses an issue where when sending Alerts to Team Members, we grab
all Members regardless of if they have the Alerts checkbox Enabled or not.
This adds a new method called `getMembersForAlerts()` that will retrieve a
list of all Team Members that have the Alerts checkbox Enabled. This updates
all of the `getMembers()` calls to `getMembersForAlerts()` when sending
Alerts.
This addresses an issue where deleting Users with Tickets and checking the
box to delete all tickets throws a warning of `Unable to manage any of the
selected end users`. This is due to commit b1f881b where we didn’t pass
the data to the submit function. All data was present in the POST array
except for the `deletetickets` option which we need to determine wether or
not to delete all tickets. This changes `promise` to `data` and passes it to
`submit()` (if exists).
This commit fixes an issue where we had 2 hrefs in the Help Topic help tips called #status, so the 'New Ticket Options' status tip was incorrect. Now there are 2 separate hrefs and help tips.
- Make sure 2FA backend is saved AND configured
- Give Admins option to reset 2FA for an Agent if they lose ability to log in w/current 2FA config
- The getConfigsByNamespace function is useful for 2FA so that we can use the value of an Agent's default_2fa to check to see if they have their 2FA configured
- Add Help Tip for require_agent_2fa field
- Do not automatically select 2FA option if it's configured, just enable it.
- Add Login loading wheel
This addresses a small issue where removing all content from the Help Text
portion for a Form Field and Saving Changes shows extra padding between the
Field Label and input field on Ticket creation. This is due to when saving
the empty content we save as an empty string which is not NULL. So when we
render the Form Field and grab the Help Text it’s not NULL so we display the
empty content. This adds a ternary operator when saving the `hint` content
that says if there is actual content after sanitizing then save the content
otherwise save `NULL`.
This addresses an issue where some complex queue criteria returns duplicate
tickets in export results. This adds `distinct('ticket_id')` to the export
query to ensure there are no duplicate results.
This commit adds an email template for sending out the 2FA token.
**Note:** We will need to add an upgrader task to import the template for existing helpdesks. I'll add it below in the comments.
This commit adds to the functionality of two factor authentication for osTicket.
- Ensures that we do not clear out external 2fa configurations
- Enables 2fa options in the dropdown box of the profile when they are configured
- Adds help tip to the Default 2FA field
- Forces Agents to configure and save 2FA if 'Require agents to turn on 2FA' is checked upon next login
- Fixes the following error:
- Call to a member function getTabs() on null in include/staff/templates/navigation.tmpl.php
This addresses issue 3796 where adding Internal Notes when creating or
updating an Email Template do not appear. This is due to the `$info`
variable being overwritten by a `foreach(){}`. This changes the
`foreach(){}` variable from `$info` to `$i` so the original `$info` variable
is not overwritten.
This upgrades Redactor from `3.3.5` to `3.4.1` so that we are utilizing the
latest code. This addresses a few security issues with upstream Redactor as
well as provides a few bug fixes and improvements. This also updates
Redactor's core plugins to ensure everything Redactor is fully up-to-date.
This addresses a small issue where we are using the wrong column name of
`lastupdate` to update the Task’s last updated date. This updates
`lastupdate` to `updated` so the column is updated correctly.
This addresses an issue where upon building the language packs, the Redactor
i18n files are not included. This is due to the wrong file paths being used
to check if the file exists and to get the file contents. This updates all
the file paths to point to the correct directory.
This commit fixes an issue where we did not check the Help Topic to see which fields should be shown for Ticket Edits.
Now, a checkbox has been added to the inline edit for Help Topics that gives an option to show fields based on the Help Topic.
If this box remains unchecked, all visible/editable fields on a Ticket's forms will show up when the edit all button is clicked.
- This is useful in the event that fields were populated before a Topic was changed to a Topic that does not necessarily include those populated fields.
If the box is checked, fields and forms will be shown/hidden based on the fields and forms for the Help Topic selected.
- This is useful in the event that a Help Topic is chosen by default for incoming Tickets that may include fields that are not needed for the Help Topic that a Ticket is switched to.
One thing to note is that on Ticket creation, if a Help Topic was chosen that didn't include custom forms and the Topic is changed to one that should have custom forms, those forms will not be added automatically with the Help Topic being changed. The Agent would have to go to Manage Forms to add the other form to the Ticket.
This addresses an issue where some LongAnswer fields with really long
content cut off the thread event `data`. This is due to the content being
longer than the max allowed characters for the `data` column. This adds
`Format::striptags()` and `Format::truncate()` to the TextareaField changes
to ensure they have no HTML and to ensure they are below the max allowed
characters. Stripping tags and truncating is done after we save the field
changes as if we do it beforehand, it will save that as the changes instead
of the actual changes.
This addresses an issue where things such as really long tables in inline
RichText Fields causes the remainder of the page to be malformed. This is
due to the content being truncated causing the broken HTML to interfere with
the page. This adds a check for RichText Fields when displaying inline and
if one, strips all tags. With the content being stripped, this adds a View
Popup so Agents can view the entire, true content. From the View Popup,
Agents can click the Edit button to edit the content. This adds a new Field
View template as well as AJAX regex/methods for returning the View Popup.
This addresses issue 3647 where Internal Activity Alerts are never sent out
for both Tasks and Tickets. Upon initial investigation it appeared that we
set the `lastrespondent` property before we call
`onResponse()`/`onActivity()` so when we checked the Last Respondent it was
the same Agent posting the Reply so an email was never sent out. Upon moving
the `lastrespondent` property below the `onResponse()`/`onActivity()` calls,
it still grabbed the current Responding Agent. Looking deeper into
`getLastRespondent()` (for both Ticket and Task classes) I found that the
query we use to get the Last Response from an Agent on the Thread, grabs the
newly added Response. This is because the Thread Entry is added before we
call `getLastRespondent()` so we really need to grab the second record, not
the first. This updates the `limit()` clause from `1` to `1,1` to utilize
MySQL/MariaDB "LIMIT offest" so that we grab the second entry which is the
true Last Response. This also moves the `lastrespondent` property below the
`onResponse()`/`onActivity()` calls to ensure we don't return the current
Responding Agent.
This commit fixes an issue we had with creating Teams with members at the same time.
Errors:
1064:
[UPDATE `ost_team_member` SET WHERE (`ost_team_member`.`team_id` = 4 AND `ost_team_member`.`staff_id` = '2') LIMIT 1]
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (`ost_team_member`.`team_id` = 4 AND `ost_team_member`.`staff_id` = '2') L' at line 1
1062:
[INSERT INTO `ost_team` SET `created` = NOW(), `flags` = 1, `name` = 'Team1', `updated` = NOW()]
Duplicate entry 'Team1' for key 'name'
This addresses an issue where upon building the language packs we store the
files for a particular branch in an identically named directory within the
PHAR archive. (ie. if branch name is `1.14.x` then the directory name will
be `1.14.x`). For instance, the Russian PHAR archive has the structure of:
```
1.14.x
|_ help/
|_ templates/
…
```
This is problematic as when we attempt to retrieve a template with
`$i18n->getTemplate()` the system can’t find it. A good example is Help
Tips, when we get a help tip like
`$i18n->getTemplate("help/tips/settings.ticket.yaml")`,
`help/tips/settings.ticket.yaml` cannot be found (because the actual path is
`1.14.x/help/tips/settings.ticket.yaml`) so the default English version is
returned. This adds a check for `$branch` and if exists we will remove the
branch name from the name/path.
This addresses an issue where using the variable `%{ticket.id}` throws an
Unsupported Variable Warning even though it's a valid variable. This adds
`id` to the var scope for class Ticket so that the warning is not thrown.
This commit improves upon how osTicket enforces password policies
systemwide for Agents and Users. Notable changes include;
* Ability to enforce policies on login
* Ability to specify applicable policy for Agents or Users alike
* Allow Password Policy plugins to expire passwords
This addresses issue 5532 where some floats are being formatted in
Scientific Format (ie. `2.777E+4`) which causes a fatal error for
`DateInterval::__construct()`. This is most likely due to the `precision`
INI setting in some instances. This adds `intval()` around `round()` to
ensure an INT value is returned to avoid the fatal error on format issues.
This addresses issue 5531 where the Signature Box no longer expands when
hovering over it. This is due to some outdated jQuery that needs to be
updated. This updates `.on('hover'` and breaks it into `.on('mouseenter'`
and `.on('mouseleave'`. This also removes `originalHeight = Math.max` as it
just kept adding more and more pixels causing the collapsed area to grow and
grow (ew). In addition, this adds 25 pixels to the offsetHeight to expand
the box past the content and subtracts 10 pixels from originalHeight so it
collapses back to the same height.
This addresses an issue where Client-side Print does not respect Agent
Identity Masking. This adds a check for `hideStaffName()` and if `TRUE` we
will use `Staff` as the Agent's name in the PDF. If
`hideStaffName()` returns `FALSE` then we will use the Agent's actual name.
This addresses an issue where Karen is not respecting the drip…just kidding.
This addresses an issue where `%{ticket.thread.complete}` does not respect
Agent Identity Masking. This adds a check for `hideStaffName()` and if
`TRUE` we will use `Staff` as the Agent's name in the thread export template
for clients. If `hideStaffName()` returns `FALSE` then we will use the
Agent's actual name. This only applies to the `thread-export.tmpl.php` for
clients.
This updates the icons for the Print options to be more explanatory of what
you will receive. PDF Files will have File Icons and ZIP Archives will have
Folder Icons. In addition this adds `title` attributes to all Print options
to note if the Agent will receive a PDF File or ZIP Archive.
This addresses issue 5513 where clicking the Add button on the Filter
Actions tab without selecting an option will insert an `undefined` Action.
This is due to the placeholder option having an empty `value` attribute.
This updates the JS to check the selected option's `value` attribute and if
empty we will return without appending. This will ensure the placeholder
option does not append an `undefined` Action.
This addresses 1/2 of the vulnerability reported at 5514 where pasting an
XSS Payload in the Category Description/Notes and saving changes without
filling out required info executes the XSS Payload. This is due to the
system not sanitizing the return values on errors. This adds
`Format::sanitize()` to the Description and Notes fields so that any value
displayed is properly sanitized. The Description/Notes are properly
sanitized before saving to the database, the issue only lies when returning
values on errors.
This adds `youtube.com, dailymotion.com, vimeo.com, player.vimeo.com,
web.microsoftstream.com` as the default values for the Embedded Domain
Whitelist feature for new installs.
This updates the System Default SLA's Grace Period from 48 Hours to 18
Hours. This ensures the SLA is in tandem with the new System Default
Schedule. With this update, the two 9 Hour days (8am-5pm) will then allow
tickets to become overdue in 2 business days.
This sets the System Default Schedule to the `Monday - Friday 8am - 5pm with
U.S. Holidays` Schedule for new installs. This will ensure all SLAs are
counted during normal US business hours (excluding US Holidays).
This commit fixes an issue we had where we were doing a union on the adhoc search queries. One should return a lookup by number and the other should return tickets that belong to the user of the number searched.
When doing the union, we just needed to make sure the columns were lined up correctly.
This updates the Print options' icons and text to be more descriptive. This
updates all PDF Print options' icons to `icon-file-text-alt` which
symbolizes PDF file. This updates all ZIP Print options' icons to
`icon-folder-close-alt` which symbolizes ZIP Archive. In addition, this
updates the `Export with …` ZIP options' names to match the PDF options'
names. Lastly, this add a tooltip (title) to each Print option that
indicates what type of download you will receive (ie. `PDF File` or `ZIP
Archive`).
This addresses an issue where setting a Help Topic via Inline Edit does not
refresh the statuses in the Reply box, but it does refresh the statuses in
the Internal Note box. This is due to jQuery not being able to append the
same `<option>` object to multiple `<select>` objects. When you use the same
`<option>` object for multiple `<selelct>` objects, it removes the object
from the first `<select>` and appends it to the second `<select>`. Instead
of reusing the same object we must clone it so it does not interfere with
the first `<select>`.
This addresses an issue where using PHP 7.4, setting Help Topic Sort to
Manually, rearranging the Help Topics, and Saving Changes throws a warning
of `Parameter must be an array or an object that implements Countable`. This
is because when sorting Help Topics, we send no IDs so the `count()`
obviously fails. This checks to see if `$_POST['ids']` exists first, if so
then we count, otherwise we default to `0`.
This addresses an issue where upgrading from pre-`1.10.x` and using PHP 7.4
throws a Warning of `Use of undefined constant TICKET_EMAIL_INFO_TABLE`.
This checks if `TICKET_EMAIL_INFO_TABLE` is defined in the Task and if not,
we define it to avoid warnings/errors.
This addresses an issue where `ModelMeta::flushModelCache()` doesn't work
correctly. In theory, it's supposed to clear all APCu cache. This is
especially helpful for Upgrades by preventing the selection of
data/structures that don't exist anymore. This is due to the fact that when
we updated `apc_clear_cache()` to `apcu_clear_cache()` we forgot to remove
the argument. `apcu_clear_cache()` takes no arguments and you would think
that PHP would be smart enough to void the argument but apparently it's not.
This removes the argument so that it works properly and clears all APCu
cache.
This addresses an issue reported on the Forum where registering as a User
with MySQL 8.0 throws an error of `Incorrect description of a {min,max}
interval.`. This is due to MySQL seeing `{` in the regex
`_auth\|.*"user";[a-z]+:[0-9]+:{[a-z]+:[0-9]+:"id";[a-z]+:` as the start of
repetition notation. In order to avoid this, we can simply escape the `{` so
it’s seen as a literal squiggly bracket and not the start of repetition
notation.
Reference:
- https://dev.mysql.com/doc/refman/8.0/en/regexp.html#regexp-syntax
This addresses an issue where deleting 2 or more Help Topics shows a warning
of `X of X selected help topics deleted` even though all selected Help
Topics were deleted. This is due to the check that ensures that the number
of Help Topics deleted is the same as the how many Help Topics you selected.
This updates the check to compare against the actual Topic count rather than
the QuerySet itself.
This addresses an issue where creating a ticket with a Reply and
Collaborators failed to add the Response. This was caused by the Owner ID
check in class Ticket as it returned an error that wouldn’t let the response
be added. This also addresses an issue where Collabs added via Organization
were being Enabled regardless of the Disable Agent Collab setting.
This upgrades Redactor from `3.2.2` to `3.3.5` so that we are utilizing the
latest code. This addresses a few security issues with upstream Redactor as
well as provides a few bug fixes and improvements. This also updates
Redactor's core plugins as well as the CSS to ensure everything Redactor is
fully up-to-date.
This addresses a tiny annoyance where updating a queue you get the message
`Successfully updated _` with the Queue Name missing. This is due to the
wrong variable name being used. This updates the variable name from `name`
to `queue-name` so the queue name shows properly on updates.
This mitigates an issue discovered by Matthew Aberegg where the Name field
for a Queue can be exploited via XSS to execute code. This sanitizes the
`$_POST['queue-name']` variable in a few places via `Format::htmlchars()` so
we are safe from any XSS attempts on creations and updates.
This mitigates an issue discovered by Matthew Aberegg where the Name field
for Saved Searches can be exploited via XSS to execute code. This sanitizes
the `$_POST['queue-name']` variable via `Format::htmlchars()` so we are
safe from any XSS attempts on creations and updates. All other Saved Search
content is parsed/sanitized correctly.
This mitigates an issue discovered by Gais Cyber Security where the SLA Name
can be exploited via XSS to execute code. This sanitizes the content for
`create()` and `update()` with `Format::htmlchars()` so we are safe from any
XSS attempts.
This addresses an issue reported by Security Innovation where the "Plural
Name" value is not sanitized which results in XSS possibilities. Upon
further investigation, none of the Create List values are sanitized so any
of them could potentially house XSS. This adds sanitization to `update()`,
`create()`, and `add()` so that all content is safe from XSS before reaching
the database and/or being returned in errors. In addition, this adds a new
argument to `create()` called `$sanitize` that determines wether or not to
sanitize the content. This argument is `TRUE` by default. Lastly, this
sanitizes the `$_POST` vars when updating the List Properties.
This addresses an issue found when investigating a separate vulnerability
where XSS can be executed in the Response and Internal Note Fields when
errors are returned or if they are rendered with data (like drafts). This
adds sanitization to both Response and Internal Note fields for the New
Ticket page and the Ticket View page. This will sanitize both POST data and
Drafts to ensure all content is safe before rendering. This also adds
sanitization to the ThreadEntryWidget so any ThreadEntryField is safe from
XSS upon rendering (like the New Ticket Issue Summary in the Client Portal).
This addresses an issue where custom validation messages are not appearing,
instead the system shows the default validation messages. This is due to
9e21dfd where we failed to consider custom validation messages. Basically,
the referenced commit made it to where we could use validation messages from
the source validation method which is great but it overwrites the custom
validation message. The end goal is to have Custom Messages displayed first,
if no custom messages then we display the Source Messages, and if no source
messages we display the Default Messages. This renames the Default
Validation Message variable from `$error` to `$ferror` (for Function Error)
and updates the ternary check to first check `$error` (Custom Message) then
check `$err` (Source Message) then lastly `$ferror` (Default Message).
This commit fixes an issue where we needed to ensure that we were checking ids against an actual user object when trying to avoid adding the ticket owner as a collaborator when merging child tickets.
This commit fixes an issue where an object could be deleted that was included in a filter action without properly accounting for the deletion. Now, if something is deleted and there is a Filter Action associated to that object, the Filter will be disabled and the Filter Action configuration will be updated to no longer include the invalid id. This has been done for the following objects:
- Help Topic
- Department
- Agent
- Team
- SLA
- Ticket Status
- Email
- Canned Response
This commit fixes an issue where we were trying to use a Plugin function that some helpdesks may not include. Rather than calling the class from the Plugin, we can use the object.deleted Signal.
This addresses an issue where saving translated Form Instructions with HTML
formatting renders the Instructions as plaintext on the Client Portal
showing all HTML, etc. This is due to saving the translated Instructions as
encoded thanks to `Format::htmlchars()`. This uses `Format::htmldecode()`
for `instructions` in `DynamicForm::getForm()` so that when the Form is
rendered the Instructions are properly displayed.
This addresses an issue introduced with the previous commit where since we
allow Formatting to be saved for Help Text now, the ThreadEntryFields do not
render the Help Text correctly. Only ThreadEntryFields display the Help Text
within the `placeholder` attribute. Since the content is placed in an
attribute, it cannot be rendered as HTML. This adds `Format::striptags()` to
`ThreadEntryField::getWidget()` so that tags are stripped from the Help Text
before rendering.
This is a rewrite of 5256 that addresses an issue where if an Agent does not
have permission to Edit Users the Edit User link on Ticket Create will show
a broken/blank popup. This adds a check for the Agent's User Edit Permission
and if they do not have permission to Edit Users we will remove the
`onclick` event so it does not trigger a popup.
This addresses issue 5428 where you can set a Department's Parent to itself,
which is not supposed to happen. This adds a check to `Department::update()`
that checks if the current Department is in the Parent's path. If so, we
will refuse to save changes and throw an error message stating `Parent
Department cannot contain the current Department`. This also fixes a small
issue where we were not using `$errors['pid']`, instead we were using
`$warn`. This updates `$warn` to `$errors['pid']` so we can use
`$errors['pid']` if set elsewhere.
This addresses an issue where adding a Task Collab fails with error `Call to
undefined method Task::getOwnerId()`. This updates
`ThreadAjaxAPI::addCollaborator()` to call `$object->addCollaborator()`
instead of `$thread->addCollaborator()`. This gives us the opportunity to
perform separate actions/checks for Ticket and Task Collabs. This also
updates `Ticket::addCollaborator()` to check if the current Collab is the
Owner, if so we will refuse to add the Owner as a Collab.
This addresses issue 5468 where updating a Schedule clears out the
Description. This is due to the wrong property name being used when updating
the Description. This updates `$this->notes` to `$this->description` so that
the Description is set properly.
This commit cleans up the code used to change the status of a Task.
- Remove unneeded code for inline task status edit
- Fix mass process verbs
- Check to see if a status goes in as a string or object for setStatus
- Make sure we're looking at Task Permissions
- Make sure task status can only be default open or closed
We need to have the updateField function in the Ticket and Task class rather than in VerySimpleModel to avoid having an irrelevant function in the ORM.
This commit ensures that if a long answer field is cleared using inline edit, we display the faded '--Empty--' string so that the agent still has the option to edit the value again.
- Put updateField in VerySimpleModel so that we don't have to have redundant code in the Ticket and Task classes.
- Change Task filter from 'Due Soon' to 'Due Date'
- Make sure we add any new custom fields on the task view
This addresses an issue introduced with 5f5403d where passing `$vars` by
reference to `Thread::addCollaborator()` broke a couple of things for
Collaborators. This reverts the pass by reference and adds a new global
variable to class Collaborator called `active`. This allows us to track the
`active` variable whilst not messing with other collab functions.
This adds a check for `$thisstaff` in `Thread::addCollaborator()`. If we
have a staff object we will enable Agent Collabs, if we do not have a staff
object we will disable Agent Collabs. This will ensure all Agent added Agent
Collabs are Enabled and any User added Agent Collabs are Disabled. This also
updates the Help Tip for the setting to remove the `Web created tickets`
part (as users cannot add collabs via web) and to clarify that this only
affects User created tickets.
This addresses an issue where not having the Audit Log plugin installed and
attempting to delete a Help Topic, Knowledgebase Category, or Page the
system fails with the error `Class 'AuditEntry' not found`. This adds a
check for the `AuditEntry` class before calling it (for Help Topics,
Knowledgebase Categories, and Pages) to avoid the `Class not found` error.
This adds a new method called `logCollaboratorEvents()` that logs any type
of collaborator event (del, add, etc.) and sends a signal for Audit Logs.
This helps consolidate all Collab Event logging in class Thread to make the
code cleaner and reduce redundancy.
This adds a new `if()` statement to `Thread::addCollaborator()` that checks
the current Ticket Owner's ID to the User's ID that is being added as a
Collaborator. If the IDs match then we will refuse to add the Owner as a
Collaborator as Users are not supposed to be a Collaborator on Tickets they
own.
This addresses an issue where `Thread::getObject()` is not available for
`Thread::addCollaborator()` as the Ticket object is missing a Status
(incomplete). This sets the default Ticket Status (if none) so that the
Ticket object is complete and can be accessible via
`Thread::addCollaborator()`.
This adds a new setting called "Disable Agent Collaborators" that allows Admins
to globally configure wether or not to allow Agents to be added as
Collaborators via any communication on tickets. In some use cases Agents do
not want to be added as Collaborators on tickets to avoid an overload of
emails/alerts, etc. This adds a new checkbox labeled `Disable Agent
Collaborators` to **Admin Panel > Settings > Agents** that if
Enabled/Checked will automatically Disable Agents that are added as
Collaborators. This disables the participant alerts for the Agents whilst
giving other Agents/Admins the ability to enable them at a later date
instead of having to manually add them back. If an Agent tries adding
another Agent as a Collaborator via the Manage Collaborators modal it will
also Disable the Agent Collaborator.
* Update class.filter.php
Remove X-Auto-Response-Suppress from $auto_headers
Fixes#726
* Update class.filter.php
Edit the 'X-Auto-Response-Suppress' filter to only include 'AutoReply'
- Move 'Select Ticket' box above 'Participants'
- Clear 'Select Ticket' when a Ticket is added
- Select the default 'Closed' status by default for the 'Child Status'
This commit fixes an issue we had with trying to create new Agents with Extended Department Access or a Team. We were trying to add them before there was a staff_id which resulted in a DB error as well as the actions not being performed. To fix this, we just need to add the Agent's Department access and Team membership after we save the Agent so that they have an id. We also need to save the Staff object in the setDepartmentId function.
This addresses an issue where checking the box next to a few User’s names
then selecting the Action to Add To Organization does nothing. This is due
to a pesky jQuery issue where `parseJSON()` will crap out if you pass in
JSON (go figure). You MUST provide a string otherwise it will silently fail.
So, this adds an if statement that checks if the content is a string and if
so we will use `$.parseJSON()` otherwise we will not parse it.
This addresses an issue where TextareaFields do not show translated
placeholders. This is due to using the placeholder from the default
configuration instead of using the local placeholder. This updates the
`TextareaWidget::render()` method to get the local placeholder instead of
using the default from config. This also passes `$config['placeholder']` as
a default in case there is no translation available.
This addresses an issue where clicking Cancel on some popups (eg.
Organization Deletion popup, User Deletion popup, etc.) will perform the
action instead of cancelling. This is because the `then()` and `done()`
callbacks used on the custom `$.confirm()` method do not respect the
returned promise. This adds a check to each `$.confirm()` usage to see if
the promise is equal to `FALSE`, if so we return false. If the promise is
not equal to `FALSE` then we continue with the callback.
This commit removes a line of code that caused the Ticket Audit modal to close any time you tried to go to the next page of audits or sort the audits by timestamp. The code was put in place 6 years ago for file upload fields, but they still work fine everywhere in the codebase without that line now.
This addresses an issue where logging out of the system using PHP 7.3 throws
the infamous `session_destroy(): Session callback expects true/false return
value` warning. This was addressed in previous updates with
`(SessionData::objects()->filter(['session_id' => $id])->delete())` but
apparently PHP 7.3 does not like that anymore so this updates it to a
ternary operator to ensure True/False return values.
This commit fixes an issue we had with creating duplicate records in the thread_entry_merge table. This would happen if you were to merge tickets, deleting the child tickets, and then try to merge that ticket into another ticket.
This fixes Issue #5379.
This addresses an issue introduced with 9e21df where `is_numeric()`
validation fails even when inserting a legitimate number. In the
aforementioned commit, we added the ability to return error messages from
the source validator method. In doing so, we changed `call_user_func()` to
`call_user_func_array()` which now passes two arguments to the validation
method. This broke `is_numeric()` validation as this method does not accept
more than one argument. This adds a new method to class Validator called
`is_numeric()` that accepts two arguments so it does not fail. In addition,
this updates the remaining validators that do not currently accept two
arguments.
This addresses an issue where formatting Help Text for Information fields
displays the content as plain-text instead of rendering the HTML. This is
due to `htmlchars()` which uses `htmlspecialchars()` to encode the content.
This updates `Format::htmlchars()` to `Format::display()` so we can render
the content as HTML rather than plaintext.
This addresses an issue introduced with 5207 where reverting the changes of
a commit left some old code behind. This causes the User Ticket exports and
Org Ticket exports to crash when clicking Export. This changes both
`filter()` methods to setting `$this->_queue->config` directly as `filter()`
no longer exists for AdhocSearches.
This commit fixes an issue we had with a recent change to User Imports. We want to make sure the agent does not have to specify the 'name, email' headers if they are typing user imports, but if they are using a CSV for imports, we need to leave the headers as they are.
This addresses an issue where if someone has the `U+1000B6` Unicode
character somewhere inside the body of their email, the remainder of the
email is cut off. The system doesn't know what to do with this character as
[it's not considered a standardized character in Unicode
itself](https://en.wikipedia.org/wiki/Private_Use_Areas) so parsing fails at
the character truncating the rest of the content. This adds a new case to
`strip_emoticons()` that strips this character if present so the rest of the
content is safe. We do not need `U+1000B6` anyways as it's part of a PUA
(Private Use Area), specifically in Plane 16, that's typically controlled by
third parties.
This addresses an issue where Help Text for TextareaFields would not let you
save text with formatting due to `Format::striptags()`. This changes
`Format::striptags()` to `Format::sanitize()` to allow formatting whilst
still preventing XSS Injections.
This addresses an issue where you cannot translate Help Text for
TextareaFields. This is due to no translate button to switch between
languages. This removes the `no-bar` option from the Help Text textarea
which shows Redactor's toolbar including the Translate button.
This adds the ability to use error messages returned by the source
validation method for more detailed errors via TextboxFields (and it's
children classes). If no error is returned by the source validation method
we will use the default error message set by `validateEntry()`.
This addresses an issue reported in the Plugins repo where attempting to use
a password that starts with any of these characters (`= - + @`) fails with
`Content cannot start with the following characters: = - + @` validation
error. This is due to Formula Injection prevention for any field that has
potential to be exported. I did not take PasswordFields into account as
these are not exportable fields. This adds a new validator to TextboxField
called `password` that calls `Validation::check_passwd` which uses
`PasswordPolicy::checkPassword()` to check the password against all active
policies. This also adds a constructor to class `PasswordField` so we can
add the `password` validator for all password fields. In addition this adds
another validator to TextboxField called `` that returns true to skip
validation (useful for LDAP password, etc.).
This addresses an issue where the Task Title field allows any Admin to
remove the View and Required perms for Agents even though this field should
be Viewable and Required. This adds the `FLAG_MASK_REQUIRE` and
`FLAG_MASK_VIEW` flags to the form install file to ensure Admins cannot
change this behavior for both perms. This also addresses an issue where the
Task Description field allows any Admin to remove the View perms for Agents
even though this field should always be Viewable. This adds the
`FLAG_MASK_VIEW` flag to the form install file to ensure Admins cannot
change this behavior.
This addresses an issue where saving multiple choices for a ChoiceField does
not show all values in Queue Columns nor Ticket Exports. This is due to the
`to_php()` method exploding on `,` while the keys are saved like `key1,
key2` (with comma then space). This updates the `to_php()` method to explode
on `, ` (comma and space) so we get the proper keys for the value lookups.
This addresses an issue where `$ost` is not available for the ticket and
task print templates which causes `(string) $ost->company;` to appear as an
empty string. This adds `$ost` to the globals for printing tickets and tasks
so that the company name is properly displayed.
This addresses issue 5345 where double quotes in a User's Name will make
their email address appear as empty (`@`). This is due to the `getEmail()`
method where we combine the User's Name and Email Address into one string by
putting the User's name inside double quotes and the email after in angular
brackets (eg. `"First Last" <email@domain.tld>`). We do not escape double
quotes within the User's name so when we insert the name between double
quotes, the string is cut off at the first double quote (eg. `"First
"Nickname" Last" <email@domain.tld>` -> `"First "`). Since the string is
incomplete we are unable to find the email address so it appears as `@`.
This adds `addcslashes()` to the `getEmail()` method so we can escape any
double quotes within the User's name and the string does not get cut off.
This addresses an issue where the `subject` and `description` vars are
missing from `Task::getVar()` so these variables are never replaced in the
Task templates. This adds two cases for `Task::getVar()`; case `description`
that retrieves the Task Description (if any) and case `subject` that
retrieves the Task Subject. This also addresses an issue where the
`description` var is missing from `Task::getVarScope()` so when an Agent
uses the Variable Typeahead the `%{task.description}` option does not show.
This addresses an issue where the New Task Alert was not functioning as it
should. This adds a new method called `onNewTask()` that runs after a Task
is created and sends out the New Task Alert (if enabled). This will take
into account the Global settings as well as the Department settings for
Alerts and Notices.
This addresses an issue where after setting a checkbox value via Inline Edit
it shows the value as `0` or `1` instead of `Yes` or `No`. You have to
refresh the page in order for the value to appear correctly. This is due to
the raw value being returned instead of it's string equivalent. This adds a
case in `TicketsAjaxAPI::editField()` for `BooleanField` that converts the
raw value to the string value with `toString()`.
This addresses an issue where checkboxes cannot be unchecked once saved as
checked. This was introduced with a fix for another issue where it's
necessary to return the default value for VisibilityConstraints. This is
fine for Holiday Schedule checkboxes but for custom fields this breaks basic
functionality. This updates `getValue()` for CheckboxWidget to only return
the default value if `$data` (source) is not set.
This addresses issue 5296 where having whitespaces at the beginning or end
of a ticket number lookup (eg. ` 643906` or `643906 `) will not show
expected results. This is due to the search query looking for `ticket.number
LIKE ' 643906%'` explicitly which will not find results. This updates the
Number Lookup method to trim all white spaces from number criteria so the
`LIKE` comparison operator works as expected and finds the appropriate
results.
This addresses an issue where lint tests complain about an undefined method
`updateEstDuedate()`. This is correct as the method is actually called
`updateEstDueDate()`. This updates the method name from `updateEstDuedate()`
to `updateEstDueDate()`.
This addresses an issue where when running lint tests it throws 150+
warnings about minified JS files. This adds the 3rd party minified files to
`$third_party_paths` so that they are ignored (`js/select2.min.js`,
`js/redactor.min.js`, `js/jquery-ui-1.12.1.custom.min.js`,
`js/fabric.min.js`).
This addresses issue 5313 where duplicate tickets appear in the ticket
lookup results; especially when looking for a ticket to merge. This is due
to a discrepancy between both queries looking for hits on the search
criteria. The first query that looks for hits pushed the `number` column
towards the end of the results and the second query has it as the second
column in the results. When we do a `UNION ALL` these values are mapped
incorrectly and it appears as there are 2 results instead of one. This adds
a new method called `lookupByNumber()` that only finds results for number
searches. This also changes the lookup URL for Ticket Merge from `/lookup`
to `/number-lookup` so that we only search for numbers. This also reformats
`lookup()` so that if the search query is a number we will pass to
`lookupByNumber()` and merge the results with `UNION ALL`.
This addresses an issue where adding a Collaborator that is from a remote
backend such as LDAP fails. This is due to the AJAX URL not being
recognized. The regex is expecting
`^(?P<tid>\d+)/add-collaborator/auth:(?P<bk>\w+):(?P<id>.+)$` but the URL
being called is `XXX/add-collabborator/addcc/auth:XXX` (with the added
`/addcc` part). This updates the regex to account for the `/addcc` part, and
adds `$type` as an argument for `addRemoteCollaborator()`.
This addresses an issue where we forgot about Emojis in the Issue Details of
Tickets created via API. This adds `Format::strip_emoticons` to class api so
that Emojis are stripped from the Issue Details for Tickets created via API.
This addresses an issue reported on the Forum where emojis are not stripped
from the subject line which causes either a blank subject or half-rendered
subject. This adds `Format::strip_emoticons` to TextboxField::parse in class
forms so all Textbox Fields (including Issue Summary) is stripped of Emojis
(since we can't handle them at all). This is also added to
ThreadEntry::create in class thread so that the ThreadEntry Titles have
Emojis stripped as well.
This commit makes sure that we do ticket->getThread() rather than ticket->thread so that if we are dealing with a child ticket that doesn't have a thread, we won't get any errors.
This fixes Issue #5372
This feature introduces a checkbox in the System Settings to force HTTPS.
This is for people who either can't or don't know how to configure redirect
rules via the webserver. If the setting is enabled, the system will redirect
all osTicket web traffic to the HTTPS protocol automatically. In addition
this adds an `HTTP_OK` option that disables the HTTPS redirect for local
calls such as cron, pipe, and cli. This also updates the remote piping
scripts (`automail.pl` and `automail.php`) to include support for HTTPS.
This addresses an issue where we pull the `first()` Form Field configuration
for attachments instead of determining if we are looking for the Ticket
Attachment Configurations or the Task Attachment Configurations. For
example, if you are creating a Ticket as a User and go to add an attachment
if somehow your Task Details Form comes up first in the configuration lookup
query we will apply the Task Attachment Configs instead of the Ticket
Attachment Configs which is totally incorrect. This updates the lookup for
attachment configurations on web uploads to be specific about what it’s
looking for so it can get the correct configuration. This also adds the
original Form's `type` to SimpleForms so we can access the Form Type when
working with SimpleForms.
Well folks, the time has finally come to lay IE in it's final resting place.
Twas a long, hard battle with IE but in the end it was defeated and it's
kingdom taken over by it's successor, Edge. Now there is a new king and IE
must be banished from the lands he once ruled, forever. It's sad to see such
a prolific leader fall to the ashes (not lol). Alright, let’s get serious
for a moment. Microsoft is discontinuing IE at the end of January 2020 so
it’s time to start showing a banner that says "osTicket no longer supports
IE." This message is shown on the Installer, the Upgrader, in the Client
Portal, and in the Staff Panel when using IE. This checks the User-Agent
header for IE’s specific header and if detected will show the banner. This
will not show on Edge, Chrome, Firefox, etc. only when using IE. We came to
this conclusion after seeing sites like Github (a microsoft product) showing
"no longer supported" banners for IE (a microsoft product).
This commit gives agents the option to change the status of the Parent ticket when doing a merge. To do this, they must choose the desired status for 'Parent Status'. If no status is chosen, the Parent Ticket will remain in its current status.
Error: Unknown column 'Z1.ticket_id' in 'field list'
This commit fixes an issue with how we approach skipping counts. If a search has a keyword or if a saved queue/search has an invalid criteria saved, we will completely ignore trying to do a count. In saved queue/searches, rather than showing a number or 500, we will display '-' in its place. For the count at the bottom (Showing # - # of about #), we will just display Showing # - #.
When merging Tickets, we automatically set children Tickets to a closed status, however, we had an issue with child Tickets that did not have a Help Topic. If the helpdesk had the 'Require Help Topic to Close' configuration, the children Tickets would not close as expected.
This fixes Issue #5317
This addresses issue 5215 where the Post-Install page references the Forum
and Docs site but the link doesn't work. This is due to the pound symbols
being the `href`. This adds the links to the `href` attribute so the links
actually link to the sites.
This addresses an issue where using "Servername\user@domain.tld" for mailbox
Login Username fails due to the Shared Mailbox Auth introduced here
(ac9ea5b). We do not check the name to see if the first part of the string
contains an @ symbol, indicating an email address. This updates the Shared
Mailbox Auth check to look for 3 parts, if detected it will use the first
two parts as the `authuser` and the second part as the `username`. This also
checks for 2 parts, if detected it will check the first part for @ symbol
and if one is present will use the first part as the `authuser` and the
second part as the `username`. Otherwise it will use both parts as the
`username`. If there are more than three parts or just one part, the entire
string is used as the `username`.
This is a rewrite of a commit that was accidentally merged. This, in part,
removes all unnecessary code from the accidental commit. This adds a new
`inheritColumns()` method to SavedQueue to use with all queues. Lastly, this
removes `$this->parent_id` from the `$hidden_cols` check so all queues
behave correctly. Most queues will not have a `parent_id` and will fail this
check.
This commit fixes an issue we had with saving an empty long answer field using inline edit. Before, the field would save as an empty line break which would then technically be set and saved, displaying nothing in the field, which prevented agents from doing another inline edit on the long answer field. This is most likely do to the redactor update that makes all the lines double spaced now.
This commit fixes an issue where we did not clear the FLAG_CUSTOM_NUMBERS flag when setting the ticket number format back to System Default for Help Topics.
We will also stop clearing saved number_formats so that agents have the option to reenable them without having the reconfigure the format.
This addresses an issue reported on the Forum where clicking Manage Account
for a User the Organization field is blank even though the User has an
Organization. This is due to the system only using `$info` which is set by
`$_POST`. Since we are not posting anything, just loading the popup
template, there is no `$_POST` so `$info` will not be set. In addition, you
cannot update the Organization using the Manage Account modal so there is no
reason to use `$info` nor is there a reason to have the Organization field
as an Input field. This updates the modal template to make the Organization
field simple table data and to use `$user->getOrganization()->getName()` for
the Organization Name.
This addresses an issue reported on the Forum where having your Client
Registration set to Private and attempting to enable the setting Require
Client Login for Knowledgebase results in an error saying `The knowledge
base cannot be restricted unless client registration is enabled`. When
saving the Knowledgebase Settings and we are updating the Restrict
Knowledgebase setting we check if Client Registration is Enabled using
the `isClientRegistrationEnabled()` method. This method only checks if the
Registration method is `auto` or `open` (Public) and does not check if it
is `closed` (Private). This is an issue in the aforementioned case as Users
can still be registered by Agents so technically registration is
not completely disabled. This removes the check altogether as Admins should
be able to configure this setting without Registration being required. This
also adds a new function called `isClientRegistrationMode()` that can be
used to compare the current Registration Mode to either a string or an array
or modes.
This addresses an issue where upgraded redactor does double spacing by
default (which matches most modern editors). A lot of people do not like
this change however so the solution is to make double spacing optional via a
setting. This adds a new Profile setting called Editor Spacing that allows
you to configure Double or Single spacing or the editor. If set to Double,
the text editor will double space when pressing Enter. If set to Single, the
text editor will single space when pressing Enter like the old redactor
version. If a staff does not have this setting configured, it defaults to
Double Spacing.
This addresses an issue where upon installing a plugin, no version number is
added in the database. This is due to not setting the version in the SQL
query when inserting the plugin table record.
This adds a new column to the Plugins template to show the Version Number
for each plugin. This adds a new method called `getVersion()` that will
return either the version number from the database or the version number
from the `load()` method.
This addresses issue 5316 where having `Require Help Topic to Close` Enabled
and setting a Help Topic via Inline Edit will not let you Close the ticket
via response box unless you refresh the page. This is due to Inline Edit not
refreshing the statues in the dropdown to select from. This adds a check in
`include/ajax.tickets.php` that checks for if we Require HT On Close, if the
ticket is open, if the staff has permission to close, and if we set a help
topic. If all of this is true we gather all of the Closed statuses and
return them in the response as `statuses`. In addition, this adds a check in
the AJAX success to see if `statuses` were returned. If so, we loop through
each, see if they already exist in the list and if not we append them as new
options. After we add all of the statues we then hide the warning banner. At
this point the agent can close the ticket via response box if they choose to
do so.
This addresses an issue where unchecking `Disable auto claim` and saving
changes will show the option as Enabled still. This is due to some changes
from Audit Log where we set `disable_auto_claim` to either `1` or `0` to
interact with the Audit Log methods. The flag is typically set to `on` or
`Null`. When we check the `disable_auto_claim` flag with `isset()`, and it
is set to `0` it will return True when it is actually Disabled. This updates
the code to unset the option after the Audit code if it does not equal `1`
so the subsequent methods can remove the flag from the department.
This commit makes it so that when importing users, the agent does not have to specify the 'name, email' headers. They can simply put the users' names and emails into the text area field.
This addresses an issue where clicking Update in the Set Password modal with
the `Send the agent a password reset email` option checked either shows a
forever spinning Loading screen or instantly kicks back to the modal having
accomplished nothing. This is due to checking `$clean['passwd1']` even when
`welcome_email` (password reset) is set. If `welcome_email` is set/enabled
we should not check the variable as there is no new password being set as we
are sending a Reset Email. This adds a check for `welcome_email` and if
none, then we check the password.
This addresses an issue reported on the Forum where the New Ticket Cancel
buttons do not work in v1.14.1. This is due to the code using older methods
utilized in v1.12. This updates the code to use the new method of accessing
the plugin objects first before accessing the plugin itself.
This addresses an issue reported on the Forum where having a Short Answer
field with it's Validator set to Number will throw validation error of
`Enter a number` when updating the field with a value of `0`. This is due to
the system converting `0` values to `0` in
`TextboxField::validateEntry()` for methods ran before the default textbox
field validation (which is `is_numeric`). This adds a check before the
default textbox field validation to see if the validator is `number` and the
value is `0`. If both are True we convert the value back to `0` (int) so
the `is_numeric` validation passes.
This addresses the underlying problem with issue 2870 where the Welcome
Email checkbox is no longer present but even then no Welcome Email is ever
sent to the Agent regardless of how they are created. This is due to an
option called `welcome_email` that is not being passed to the `update()`
method for Staff. When an Agent account is created with no Password set and
the Authentication backend is not external we should send the Welcome Email
so the Staff in question can create a Password and access the system. If no
password is set and the authentication backend is external however then we
should not send the email as the Staff will use their AD credentials to
login. This adds an else statement to set `welcome_email = 1` if there is no
password set and if there is no backend set or is local.
This addresses an issue where saving a Saved Search with "Use standard
columns" Enabled, shows the Customizable Columns instead of the Standard
Columns and does not show the option Enabled as the INHERIT_COLUMNS flag is
not set. This adds a check when saving a SavedSearch for the
`inherit-columns` setting and if set, we set the Queue's INHERIT_COLUMNS
Flag.
This addresses an issue where saving a Parent Queue with "Use standard
columns" Enabled will show the option Enabled but still show the
customizable Columns instead of the Standard Columns. This addresses an
issue where saving a Child Queue with "Inherit columns from the parent
queue" Enabled shows the Standard Columns but does not show the option
Enabled. This adds a check in `inheritColumns()` for Staff Configurations
for the queue and if exists we use the Staff preferences, else we default to
the Queue Flag check. This adds a new method called `staffSettings()` that
returns staff settings for a queue. It takes an optional argument (a
setting's name) that can return a specific setting's value.
This addresses part of issue 5259 where Advanced Searches are showing the
Customizable Columns even though you cannot customize an Advanced Search's
columns. This adds some JS to hide the `.if-not-inherited` div on initial
load if `.inherit-columns` checkbox is Disabled.
This commit fixes an issue where we did not check to see if we needed to remove referrals. For example, if a Ticket is referred to a Department and then the Ticket is transferred to that Department, we should remove the referral.
We will now check/remove referrals as needed for Departments, Agents, and Teams.
This addresses an issue where some email attachments are not being added to
the thread. This is due to Pear's `Mail_mimeDecode::_parseHeaderValue`
function not parsing the headers correctly. This updates
`Mail_Parse::getAttachments` to check the `content-disposition` for a
filename if all else fails. This will ensure a filename is returned if the
headers are not parsed correctly.
This commit fixes an issue where an unset Date Time field would display as 0. As a result, if you were on the all edit page and edited some other field, it would appear as though you edited the date time field as well because it had a value in it. Instead, we need to make sure that the field renders as truly being blank if it isn't set yet to ensure nothing is being saved to it.
This commit fixes and issue where the $key variable was overwritten when creating a foreach loop. Since we didn't actually need the key, it can be removed from the loop.
Use end date, based on grace period, when getting occurrences as opposed to
count. This helps avoid accidental fast-forwarding of date counter since
only entries in scope are considered.
The commit also addresses infinite loop when counting time.
This addresses the `session_destroy()` warning many people are receiving
with PHP 7+. The warning states `PHP Warning: session_destroy(): Session
callback expects true/false return value`. This is because our session
destroy method does not always return true/false, sometimes it returns
`int(1)`. This adds a check to see if the session was not deleted
successfully, if not it returns false, otherwise it returns true. This will
ensure `session_destroy()` always receives a true/false return value.
This commit fixes an error where queue counts cannot be returned if the config saved for a queue is invalid. We try to build a query that does a count based on the criteria saved in the config, so when we try to build the query for an incorrectly saved config, the query we try to write looks something like this:
COUNT(DISTINCT CASE WHEN THEN A1.`ticket_id` END) AS `q15`
Rather than trying to do a count for these, we should just skip over them so that no error is thrown since there is no way we would be able to count it anyway.
It is also possible for there to be more than 1 criteria defined, and if one of them is wrong, the same error will be thrown. We can check to see if there are multiple criteria, and if one is empty, we can skip that count as well.
Commit 3a41b0 partially addressed initial occurrence issue from Starts On
perspective but failed to consider if the occurrence is already in the past
or out of scope.
This commit addresses the issue for realz.
This commit fixes an issue where we were displaying array keys instead of array values for the thread events of edited file upload fields. Displaying the array values will show the file's name rather than the file's index in an array.
This adds a tooltip for the Email Login Information Username. This explains
the different formats we accept and includes a link to the documentation
site for a deeper explanation.
When an agent uses the search bar located in the ticket queue, we include a dropdown that shows if the search has found any tickets based on what the agent has typed so far. We also include the number of tickets found in parentheses.
This commit fixes an issue where the number in parentheses for the tickets found always showed as (1). To fix this, we needed to group tickets found based on the ticket user's email address.
This commit fixes an issue where when an Agent opens a Ticket, the URL still had a=open in it. This made it to where if you refreshed the page immediately after creating the ticket, a new identical ticket would be created. It also made it to where if you tried to open a task from within the ticket immediately after opening it, you would be navigated to the open ticket screen.
To fix this, we can just set the redirect to go to the ticket's id once the ticket has been created.
This addresses 1/2 of issue 3573 where deleting Notes does not ask for
confirmation which can be a huge problem if you accidentally click the trash
can. This adds basic javascript confirmation to ensure you truly want to
delete the note.
This addresses an issue where the Action drop downs, if long enough, will
appear behind the Redactor toolbar. This adds a `z-index` property of `1` to
Redactor toolbar so it appears in the background.
This commit improves the query we use to get tickets in queues.
It also makes the relationships for user and dept nullable in Tickets which should help with performance as well.
This addresses an issue where printing a Ticket with a Table in one of the
threads will cause the PDF to be malformed. This is due to mPDF config
variable that was changed (most likely by `git checkout` or git conflicts).
This sets the `ignore_table_widths` variable back to true so that tables
will fit the PDF width.
This commit fixes an issue where Starts On date wasn't considered when
determining entry's initial occurrence. This was an issue for entries with
start date in the future.
This commit adds the 'Required to close tickets' warning to inline edit fields if they are configured with the Data Integrity box checked (Require entry to close a thread)
This commit reverts commit cedd6121 because it broke adhoc search queue name
(describe).
The spirit of the initial change was correct but support of complex criteria
wasn't needed after all due to difficulty supporting multiple organizations
- something we will revisit in the future.
Commit 8c76d70 changed how SLA due date is updated but failed to clear
existing & expired due dates when a ticket gets reopened.
We also previously removed the SLA on expired SLA due dates but this commit
simply clears old date and recalculates new one based on reopen date.
This commit addresses possible Arbitrary Method Invocation via AJAX file upload.
To save some memory osTicket uses callback method to fetch the content of a
file on mail fetch. $file['data'] was overloaded as a callback by simply
checking if the content is callable, resulting in method invocation when
content of the uploaded file is a callable.
The address the issue we're not using locally set callback parameter / method.
This commit addresses a vulnerability on how osTicket authenticates
auth-tokens used for auto-login to view ticket status.
The validation process failed to handle unexpected type handling issue
making it possible for users to exploit type juggling and authenticate using
only email and ticket number.
This commit mitigates insufficient validation in mPDF library that enables a
malicious intruder to inject arbitrary PHP objects via css @import utility
that may result in Remote Code Execution.
If a Task has a related ticket, put a link to get to the ticket from within the task as well as add a ticket column to the tasks queue.
This fixes Issue #5093
This commit fixes discrepencies we had with organization updates for the audit plugin and organization updates from a User.
It also ensures that we log the following Organization edits:
- Update Primary Contacts list
This addresses issue 5176 where some Plaintext URLs are not completely
clickable. This is due to the regex check for clickable URLs not including a
few characters. This adds `[`, `]`, and `/` as matchable characters so urls
like
`https://test.com/cart/add?route=marketplace/extension/info&product[123]=3`
will be completely clickable.
This addresses an issue where since the Redactor upgrade the Reset buttons
do not work anymore. This is due to the code referencing old plugin/module
code that either no longer exists or has changed names. This updates the
reset button code to reference the new Redactor plugin/module methods.
Commit d8b61e83 correctly addressed an issue with criteria for team assignment
when an agent doesn't belong to a single team, BUT failed to consider cases
that the criteria is part of a set of constraints. e.g Tickets assigned to
Me OR one of my Teams.
This commit adds a check to skip team check when multiple constraints are
included.
The date picker already has the user's timezone factored in to the
selection. Removing user's timezone allows for admin set queues to maintain
the original timezone selection.
This addresses an issue with v1.14 where `??` (null coalescing operator) in
class Export throws a fatal error when using PHP 5.6. This is an issue
especially for people who cannot upgrade PHP but want to take advantage of
the latest osTicket codebase/features. This updates the null coalescing
operator to an isset ternary operator to keep backwards compatibility with
PHP 5.6.
This patch modifies the upgrader for ticket merges to add a new table, thread_entry_merge that will store data for thread entries related to ticket merges. This modification improves the upgrade process.
This addresses issue 5156 where using something like AWS RDS shows incorrect
timezone for the database. In systems like AWS RDS you cannot set the
`@@global.system_time_zone` variable to anything other than `UTC` which is a
problem. This updates `db_connect` to set the session timezone to the global
timezone for every connection. This will ensure the appropriate timezone is
used in subsequent methods.
This adds the ability to dowload a ticket thread PDF in a ZIP file with all of
the attachments included. And, optionally, also include the associated tasks,
again with a PDF of the thread and all attachments included.
Conflicts:
include/staff/ticket-view.inc.php
scp/tickets.php
This commit modifies the code to ensure that if the 'Disable auto assign on reopen' box is checked for a department, reopened tickets are open as unassigned when a ticket is reopened by a user's message as well as when an agent manually reopens the ticket.
This addresses a long-time issue of the famous `DB Error #1062` when
uploading an Inline File to a Draft. The issue is that the system does not
check if an Attachment record exists before creating a new one. We create a
new Attachment record, we go to save it, and the system errors out because
that record already exists. This adds a check to see if the Attachment
record already exists and if so we use that instead of creating a new one.
This addresses a small issue where the system shows inline checkboxes
centered at the bottom of the text which makes it look out of place. This
updates the CSS for `input[type=checkbox]` to make the `vertical-align`
property equal to `middle` which renders the checkbox correctly.
This addresses an annoying issue where Chrome autofills the Username and
Password for Email Authentication even though we have the
`autocomplete="off"` attribute set. This changes the attribute from
`autocomplete="off"` to `autocomplete="new-password"` so that Chrome will
not attempt to autofill the credentials. More information on this can be
found [here](https://bugs.chromium.org/p/chromium/issues/detail?id=468153).
This feature adds the ability to separate the IMAP/POP and SMTP credentials
for a System Email. This adds a checkbox next to the Authentication Required
setting where, if Enabled, will show two additional inputs for the SMTP
Username and Password. If Authentication Required is set to No the SMTP
Username and Password inputs will disappear as they are not needed. If the
checkbox is Disabled the system will use the IMAP/POP credentials for SMTP.
This feature adds a textbox in the Email configurations that allows you to
configure a specific Folder to fetch from. If no folder is provided the
system will fetch from the INBOX as usual. This also adds a check so that if
a Folder is given but doesn't exist and can't be created then the system
will error out with a detailed message.
This addresses an issue raised in 5111 where the `in-reply-to` header is not
sent with outgoing emails. This is due to the `$recipients` variable being
an instance of `MailingList` which is not handled correctly in
`class.mailer.php`. This adds a new case to handle `MailingList` directly.
This adds a new feature called iFrame Whitelist that offers the ability to
configure what domains you want to be whitelisted for iFrames used in the
system. Basically, if you want to insert an iFrame in the system you'll have
to whitelist the domain first. If you insert an iFrame with a
non-whitelisted domain the system will remove the iFrame upon saving. This
keeps current functionality where by default the system allows YouTube,
Vimeo, and Daily Motion.
This feature adds a textbox in the Email configurations that allows you to
configure a specific Folder to fetch from. If no folder is provided the
system will fetch from the INBOX as usual. This also adds a check so that if
a Folder is given but doesn't exist and can't be created then the system
will error out with a detailed message.
This addresses an ORM failure where upon refetching an object from the
database that no longer exists the system crashes hard. We use the `one()`
method which expects one result, if there is no result it throws a
`DoesNotExist` exception. We are not catching the exception properly which
crashes osTicket and forces you to clear the session via browser or
database.
This addresses an issue on the Forum where deleting an Organization causes
the session to fail. This is due to the Organization QuerySet being stored
in the session and not being cleared out when deleted from the system. This
causes the system to try to refetch the object from the database which it's
not there as it's been deleted and therefore causes the session to crash.
This addresses issue 5123 where fetched Emails do not reject attachments
that are not allowed. This is due to setting a File ID inside of an array
called `$file[]` but not unsetting it when the attachment hits an
FileUploadError. This updates class MailFetch to set the file array back to
empty so that the ID is cleared and the error is added correctly which
rejects the attachment.
Some roles need the ability to mark a ticket as Answered/Unanswered but must not be able to reply directly to the customer. Both are controlled by the Post Reply permission. This seperates the two functions so they can be managed independently.
When tickets are merged, we should automatically close children Tickets. This commit gives the Agent an option of which closed status they want children tickets to be set to.
This references issue #5049
This addresses an issue where Piping email to osTicket and having Umlauts in
the Subject line causes the Subject to be malformed. This is due to the
`mimedecode()` method for class Format which is used by the API to transcode
the Subject line in emails. This adds a check to see if the
`mb_detect_encoding()` method exists so we can detect the value's encoding.
If it exists and we can detect the value's encoding the system will
transcode the text from the detected encoding to UTF-8. If we cannot detect
the encoding the text will continue through the other encoding checks.
This addresses issue 4884 where sending an email with Umlauts in the From
Name causes the User's Name and Email to be malformed. This is due to
outdated RFC822 from Pear. This replaces the old RFC822 Pear module with the
latest release so that we are up to date.
This renames the `Allow iFrames` setting to `Allow System iFrame` as this
better fits the use-case. This also updates the Help Tip information to
include the new title and expands on what you can input (ie. URLs). Lastly,
this renames the validator for the `Allow System iFrame` setting from
`cs-domain` to `cs-url` as it technically validates a comma separated list
of URLs (not just domains).
This addresses issue 5122 where having a space at the beginning and/or end
of the login Username/Email on the Client Portal the system will return
`Access Denied`. This is due to the system not trimming the rogue spaces.
This adds `trim()` around the Username/Email so that the spaces are removed
and login will be successful.
In 5120, the reporting party also mentioned that they receive an error of
`script '/xxx/osTicket/kb/ajax.php' not found or unable to stat`. This is
due to the AJAX call being inside the KB directory, and `/kb/ajax.php` truly
does not exist. This adds `ROOT_PATH` to the beginning of the AJAX call so
that no matter where it is, it will point to the correct location.
This addresses 5120 where main (or Parent) FAQ Category Titles are not
translated even though the child Category titles are translated correctly.
This is due to to the system pulling the Full Name instead of the Local
(translated) Name.
Commit 17f958c4 changed overdue query to ORM but failed to take into account
the state of the ticket's status. This resulted in closed tickets being
marked overdue.
This commit fixes the issue by making sure the check is limited to open
tickets only.
This commit adds a setting to Admin Panel > Settings > Tickets to enable
ability to auto-refer tickets, on close, to assigned or closing agent.
This is necessary when you want to give agents with limited access continued
access to assigned tickets after they're closed.
- remove unused $thisstaff variables
- pass an array called $extra to the register function so that we can set the interval and file name
- Error Fix: missing curly brace
- Lint Fixes: misspelled method calls
- Add AuditEntry stubs
- Reduce lines of code
This commit ensures that we check the 'Show View Audits' configuration before exporting Ticket audits so we can determine if we want to see the Ticket view events in the export or not.
- Reduce lines of code for Organization audits
- Refer to audit files in phar format, not normal file format
- Update Plugin name
- Remove unneeded comments
- Do not write audit record if the object hasn't been initially saved yet (Dept/Team create)
- Add the audits.php file
- add a new method called auditPlugin that returns true/false depending on if the plugin exists and is active
- reduce the amound of info in the $type array. we can get the rest of the info needed in auditObjectEvent
- remove unnecessary model info
- etc
- create flagChanged/statusChanged functions to see if flags have changed
Function getPluginByName added to class.plugin.php. This function has 2 variables that can be passed in: $name and $active (bool default false). It will return the name of a plugin if it is found in the database. If $active is true, it will also check to see if the plugin is active before returning the name of the plugin.
Using this function, we can be sure that the plugin is invisible and no extra code is run to try to log an audit if the plugin is disabled or not installed at all.
- Make sure all audits contain the following data
{"name":"object name","person":"thisstaff name"}
- Audit configurations that do not pertain to specific objects. These configurations are found in the config table
- Audit individual configurations that can be set per object for the following:
- Help Topics
- Departments
- SLAs
- Pages
- Agents
- Account
- Permissions
- Profile
- Teams
- Roles
- Definition
- Permissions
- Ticket Filters
- Email Templates
- Emails
Note: In class.auth.php, the extra lookup has to be done because the staff/user that were looked up are using the StaffSession/ClientSession classes
- ability to export Agent audits
- ability to export Ticket audits
- ensures that the export for Agents, Tickets, and Users takes plugin options chosen into account.
- Add a Ticket Audit Log to show all Ticket activities
- Add a User Audit Log to show all actions a User makes in the system:
- Login
- Logout
- Excessive Login Attempts
- View Ticket (as User or Collaborator)
- Edit Ticket Field
- Edit User Profile
- Create Ticket (through email or front end)
- Add Collaborator (through email)
- Post Message (as User or Collaborator)
This addresses issue 5095 where installing a Language Pack and visiting the
Dashboard > Information page without OpenSSL installed/configured will throw
a fatal error of `Call to undefined function openssl_pkey_get_public()`.
This is due to no check for the `openssl` extension before the dependant
method is called. This adds a check so that if OpenSSL is not available we
can return a useful error code of `VERIFY_EXT_MISSING` (which is error code
`2`) and continue without disrupting the content.
This addresses an issue where initially saving the ACL will fail. This is
due to the incorrect variable being used to lookup the IP in the ACL. This
updates the variable from `$acl` to the correct variable `$vars['acl']`.
This addresses issue 5084 by partially reverting commit `fefed14`. In said
commit, we updated `THIS_VERSION` to utilize `MAJOR_VERSION` which is fine.
However, we also updated the deploy module to copy the same format. This
interferes with the osTicket Version check by not including the entire
subversion and not starting with a `v` (ie. `v1.12.3`). This reverts the
copied format section of the commit so that `THIS_VERSION` will be the full,
non-git version when deployed/packaged.
This addresses an issue reported on the forum where printing a ticket in
v1.12 and above requires `mbstring`. This updates the print call to check
for the `mbstring` extension and if not loaded will fail with a detailed
error `mbstring extension required to print ticket to PDF`.
This commit addresses two issues related to date / time format.
* 24 hrs format, when selected, is now used system-wide even on thread items
* PHP-to-JS date / time format translation is now down in the backend
This addresses issue 5053 where since the Redactor Upgrade, QuickNotes are
not working correctly. This is due to using old redactor methods instead of
the new methods. This updates QuickNotes to use the new methods so they work
properly again.
This implements 5059 to make it valid for upgrades and new installs. This
updates the Staff/User email lengths to match the `ost_email.email` column
length. This makes all email address lengths consistent throughout the
helpdesk.
This addresses issue 5007 where when using the complete thread variable
there is no padding between thread messages in Outlook desktop app and makes
the thread hard to follow. Outlook does not respect some CSS rules that are
accepted in most (if not all) modern email clients. Since we can’t use
normal CSS the workaround is to add a blank table row (with a single space)
so that it forces "padding" between the end of a message and the start of
another.
Before
(image)
After
(image)
This addresses an issue where upgrading from v1.6 to a release on or after
v1.12 will hang on login and eventually timeout. This is due to the system
not being able to fetch the config which logs a db error which calls the
config and continues the loop. For now, we need the config in the
constructor so that the loop doesn't occur and we can continue to upgrade as
normal.
TODO:
- For a permanent fix, we need to figure out why the loop occurs when not in
the constructor and vice versa.
This commit fixes an issue where we sometimes show a default option in selection fields when they cannot be set anyway.
Moving forward, the option to set fields to a default value will only be shown while opening a ticket.
This commit fixes an issue that allowed Agents to clear the Duedate on a ticket using inline edit. We were saving the value 0000-00-00 00:00:00 to the database which the ticket would then display as 12/1/02 06:09 pm.
Instead, if an Agent clears the Duedate field, we should save the duedate as null and the ticket should continue using the est_duedate.
This addresses an issue reported on the Forum where creating a new Agent and
setting a password hangs when using PHP 7.3. This is due to too few
arguments passed to `PasswordPolicy::checkPassword()`. This updates the call
to include a second argument of `null` so the method is satisfied and we can
continue with checking the password.
This commit fixes an issue where the flags field was added to the Ticket table in the installer, but it was never added to the upgrader, so when trying to add a column after the flags field, there would be an error for people whose install was done before the flags field was introduced to the installer.
This commit fixes an issue where if your date format is dd/MM/y h:mm a, the date picker will show the wrong year because the dates were not translating correctly between PHP and JS.
This addresses 5035 where the ticket Assignment Event show the Ticket
Owner's name or "SYSTEM" as the assigner when tickets are created via Client
Portal, API, or Email Fetching. This updates the event to include "Ticket
Filter" as the assigner if the assignment was triggered by a Ticket Filter
Action. This makes for more accurate events and is very useful for
statistics/debugging. This keeps current functionality of Agents creating
tickets shows the creating Agent's name as the assigner. This also adds a
new parameter to `assignToAgent()` and `assignToTeam()` called `$user`
(defaults to null) that allows us to pass different usernames/user objects
for the events. This makes the two methods versatile so if we add new ways
to assign to Staff/Teams in the future we can pass the new name/object with
no issues.
If we choose to delete a child ticket during merging, we should still keep the child thread so that we have the merge indicator on the parent ticket to show us which threads belonged to the deleted child and which belong to the parent ticket.
This commit makes the getChildrenTickets static and then creates a new function called getChildren for the times we need to get children from an existing Ticket.
If no value is saved to a custom Priority field, we need to make sure we don't t
ry to treat a null value as an array. We should instead just return the null priority.
If we choose to delete a child ticket during merging, we should still keep the child thread so that we have the merge indicator on the parent ticket to show us which threads belonged to the deleted child and which belong to the parent ticket.
This commit makes the getChildrenTickets static and then creates a new function called getChildren for the times we need to get children from an existing Ticket.
This addresses an issue where resolving conflicts on Git instead of rebasing
caused a file to appear that wasn’t supposed to. This also addresses a typo
where there were extra underscores in the table names.
This addresses an issue where the previous CSV security patch causes an
error when creating an Advanced Search with criteria like `User / Email
Address => contains => @domain.tld`. The system tries to validate the field
and since `is_formula` is the default validation for TextboxFields the
system sees `@domain.tld` criteria as a formula and throws the `Content
cannot start with the following characters: = - + @` error. Advanced
Searches do not need the `is_forumal` validation as the fields are not
exportable. This adds a check to see if the field's form is
`AdvancedSearchForm` and if there is no `validator` set it gets set to `adv`
which bypasses the validation.
This commit fixes an issue where if you were to change a Ticket to the Resolved status and then to Closed, the dashboard statistics would show that you had closed 2 Tickets even though both events were done on the same Ticket.
We should only count one closed event per Ticket.
This was reported in Issue #5018.
This commit adds the database patch to add the thread_type field to the thread_event table.
**Note: it is rebased on top of the Schedules and Ticket Merge feature in order to be the latest patch. We must merge those two features before merging this!
This commit adds a button to redactor to save drafts automatically when the admin clicks it, rather than having to wait 30 seconds every time.
Note: This option currently only appears if there is an existing draft already
Also, it will automatically save drafts on tickets if a field that causes the page to refresh is clicked. These drafts save regardless of if there is an existing draft. Those fields are:
- Status
- Department
- User (includes Change Owner in dropdown)
If an Agent uses inline edit to modify a single field, rather than saving the value and refreshing the page, the value will now populate in the form without having to refresh. This is useful in the event that an agent has begun writing a response to the user and does an inline edit before the draft has had a chance to save, causing them to lose their draft.
This fixes issue #4985.
This changes the way the Redactor editor works to create paragraph tags
(<p>) instead of div tags. Breaks can be added by pressing SHIFT+ENTER
rather than just ENTER, so there's really no significant difference in
usability. This also fixes the block system so that text direction
plugin can work now.
Don't initialize the translatable plugin for Redactor for single language
systems. If there is not at least one secondary language installed for the
system, then there is also no need to allow HTML fields to be translated
into--well ultimately no other language.
This is used in places like the help text or html fields for custom forms
where the text can be translated based on the languages installed in the
help desk.
Also, stretch the edit on the ticket and task view pages so that the
size of the HTML editor is roughly the size of the entries in the thread
listing.
And fixup the CSS for the file drop area so it looks connected to the
HTML editor.
This includes the textdirection plugin which allows for rotating text
direction from left-to-right to right-to-left and the imageannotate
plugin which allows for marking up images added. These features will be
reimplemented and added as separate pull requests.
This commit reallows us to delete threads and thread entries when deleting tickets by adding a column called thread_type to the thread event table that contains the same data as the object_type field on the thread table. The reason for doing this was because in the dashboard reports, we were relying on the object type in the thread table to give us accurate report data.
This commit ensures that if we print thread events on Ticket PDFs, the time is never relative time, even if the agent has their time set to relative. Relative time should only be an option when viewing a Ticket online.
Additionally, we do not need to put anything related to relative time in the ticket-print template.
This addresses an issue where any Agent can change the Type and Variable of
some of the core fields. In most cases, changing the Type and Variable of
core fields will cause issues later on down the line. With this in mind, we
need to set the flags to where Agents cannot change the Type and Variable of
specific core fields to avoid any issues. This updates the installer to
reflect the additional flags and updates the Upgrader to add these flags to
existing fields.
This commit adds the database patch to add the thread_type field to the thread_event table.
**Note: it is rebased on top of the Schedules and Ticket Merge feature in order to be the latest patch. We must merge those two features before merging this!
This addresses an issue where a User sending an email message with a
different Department as CC to the system will not refer the CC'ed Department
until the email is fetched a second time. The old thinking was that since
the User CC'ed the other Department the other Department should receive a
copy of the email in their mailbox. When the system fetches the User's
message from the original Department email it gets added to the thread but
doesn't refer just yet. When the system fetches the copy of the message from
the User in the other Department's email it will then refer the other
Department. This is a problem especially when you are not fetching or
forwarding from the other Department's email address. This updates
`Thread::postEmail()` to include the check for `$mailinfo['system_emails']`
and if set we refer the Department immediately.
This commit makes sure that the thread entries on printed tickets match the same order as the ticket in the helpdesk. A new function, sortEntries was added to class.thread.php so it can be called for the entries template as well as the ticket print template.
We also make sure that the order of thread entries display correctly for the client side tickets and printed pdfs of tickets.
This addresses an issue where User/Orgs Ticket Exports showed ORM relation
names instead of the actual data. This is due to the User/Org Tickets Export
using the old export methods instead of the new Queue export method. This
updates the User/Org Tickets Export to utilize the new Download/Email export
method added in previous commits.
This adds the ability to use Qs instead of Queue Criteria to better filter
Queues. This updates class Queue and adds two new functions `filter()` and
`getFilters()`. `filter()` simply adds the Q(s) to the new `filters`
property for later access. `getFilters()` simply returns all of the queue
filters (if any). In addition, this updates the `AdhocSearch::load()` method
to detect if the Queue's Config is an instanceof Q and if so we filter the
queue by that Q else we will use the Queue Criteria (if any).
Currently we can't search for tickets with the User's email address equal to
`example@domain.com` **OR** Collaborator’s email address equal to
`example@domain.com` as Queue Criteria is only seen as **AND** statements.
The queue criteria for this would look like:
```
array(
array('user__emails__address', 'equal', $user->getEmail()->email),
array('thread__collaborators__user__emails__address', 'equal',
$user->getEmail()->email),
)
```
With the new filter methods we could actually find those tickets with a Q
like:
```
Q::any([
'user__emails__address' => $user->getDefaultEmailAddress(),
'thread__collaborators__user__emails__address' =>
$user->getDefaultEmailAddress(),
])
```
This addresses an issue where Queue Exports do not have a default sort and
therefore are sorted incorrectly by ASC (old tickets on top latest tickets
on bottom). This adds a new method to class Queue called `getColumn()` that
takes a Column ID and returns the appropriate column (useful for applying
specific sorts to a specific column). In addition this updates the
`getSortOptions()` method to check for sorts saved in the session. If sorts
for the queue are saved in the SESSION we will apply them to the Queue, if
none however we will use the Default Sort.
This feature has been updated to be the patch after Schedules (#4984). That being said, this feature requires an upgrade as well, so please do not merge this to your production database. You should test the feature on a new branch until it is officially merged to the main codebase.
This commit makes sure that the thread entries on printed tickets match the same order as the ticket in the helpdesk. A new function, sortEntries was added to class.thread.php so it can be called for the entries template as well as the ticket print template.
We also make sure that the order of thread entries display correctly for the client side tickets and printed pdfs of tickets.
- Fix logic for when we should unlink tickets (changing from link to merge or changing link parent)
- Make sure if we're unlinking to change the parent we still log the link event for the new link
- allow changing merge type on mass process as well
- fix error message for merged chidlren being selected (add ticket_pid back)
- add an error to not allow merged tickets to be added manually to the form. want them to be checked in mass process so they will sort correctly
- show children tickets in the merge form within ticket view
- fix vertical scroll on merge/link modal
- scoot the merge/link icons div to the left so they don't run into the icon-trash button
If a parent ticket is deleted, we need to go to each child thread and set the object type back to 'T' so that those tickets will show up in the ticket queue again.
Note: If a message is emailed to the child tickets (now regular tickets), they thread back to that ticket as normal
If children tickets are deleted and then the parent is merged to another ticket and becomes a child, we have to move all thread entries, even if they were child entries.
- Reduce lines of code in 'Related Tickets' tab
- Wording tweaks
- Restructure unlinking
- Make thread entry and collaborator count distinct
- Make sure all merged tickets (children included) show up for searches and saved searches
- Make sure the count for saved searches will count children merges
- Clean up redundancy in general
- Fix linking sort order (if set)
- Make sure child thread entries are separated and then sorted for separate merges
Make sure we still show the linked icon if necessary on searches. Merge and Link follow the same criteria but look for different flags, so if the merge flag isn't on a ticket, we should then check for the link flag
When merging tickets, if children have a different department from the parent, refer the children departments to the parent ticket. Otherwise, Agents would only be able to access the children ticket they used to have access to with a link or search because we hide merged children from the ticket queue.
- Create a child_thread relationship on tickets so that children tickets can be searched
- For Ticket::getThread if the ticket does not have a thread but it has a child_thread, return the child_thread
- Add referred children tickets to staff's ticket visibility
- Do not change the object_id in the thread table
- Allow ticket merge if Agent has referral access to a Ticket
- Hide children tickets from queues
- Make sure children tickets can be searched
- Remove getIdByObjectId function (no longer needed)
- Remove children tickets from queue counts
- Pass a new variable, $manage, to the previewCollaborators function (and in turn the showCollaborators function) so that we can specify when we want the 'Manage Collaborators' option to be available
- Set the new variable every time one of those functions are called
- make user + collabs the default option. make sure they still have option to drop collabs if the users are the same
- Space out the 'Delete Child Ticket' and 'Move Child Tasks to Parent' checkboxes
- We should show the Participants dropdown regardless of users on Tickets because if it was ever hidden, other Tickets could be added to the form that would need to see the options and it's a static form field (doesn't pop up if a Ticket is added w/diff user or collabs)
This commit will give the Agent the option to move participants to the parent ticket based on whether the user on multiple tickets is the same or different as well as if there are any collaborators involved in the tickets.
This commit adds an icon to the merge tickets form that shows child tickets when hovered over.
Additionally:
- pull annotations to the far right
- Only show annotations if the count is > 0
- Decide whether to show link or merge annotation based on the merge type
- Add a new collaborator annotation for the collaborator preview
- Put the ticket preview on the ticket number rather than collaborator preview
- Give an option to move child tasks to parents for merges
- Add a task count to the merge/link field
- Make sure the tickets display the same info on mass process and adding tickets individually
- make sure ticket #, subject, and user name appear when adding new tickets to the form
- use getThread() function instead of ->thread since a ticket could be a child which has no thread (it uses the parent thread)
- Make sure that for both mass process and ticket-view merge/link, we're getting tickets by filtering,not lookups
- Move getMergeType beside relevant functions
- Create function to get merge types based on flags
- Add Subject and User Name to Merge/Link form
- Show merged thread events to Users
- Put a warning for the Users logged into the front end to let them know they can’t reply to merged children
- Put a link to the Parent where they can reply
- Allow a User to view and reply to a parent ticket even if they're not the ticket owner or a collaborator (they can reply via email anyway)
- This will add them as a collaborator to the parent
- During a merge, if the users are differnt, give the option to move users or users + collaborators to the parent (remove the 'none' option)
- Put checkboxes before label text on Merge/Link form
- Move 'Delete Child Ticket' option to bottom of form
- Add extra info to tickets on Merge/Link list
- Subject
- Minor fix with Link annotation so it shows up everywhere
- Make the tickets div in the Merge/Link form scrollable
This commit removes the option to show child thread entries on visual merges. If an Agent wants to see all thread entries together, they should perform a merge. If they want to see thread entries from child tickets somewhere within the Parent Ticket, they should use Thread Preview on the Related Tickets tab.
If a linked parent is merged into another ticket w/a separate or combine merge, what should happen to the linlked children?
I want it to just unlink the children and handle the parent as usual
- Set the linked flag in the setMergeType function
- Make sure the parent and children tickets' merge types are set each time merge is called
- Make sure we always log a thread event for merges/links on all related tickets
- Make sure no flags are set if child tickets are deleted upon merge
- Make sure we save the parent ticket when choosing whether to show child tickets in link
- Fix the reload page function
- Create Role permission for linking tickets
- Logic to show/hide merge or link option depending on what is chosen
- Change 'split' event to 'unlink'
- Write thread events for link and unlink
- Add link annotation
- Add link column
- Make merge and link available in advanced searches
- Make merge and link exportable
- Make sure merged Tickets cannot be linked
This commit disables children from being allowed to be a part of new merges when merging from an individual ticket. It also makes sure that the merge type cannot be changed.
This commit ensures that if you choose to delete child tickets when doing a merge, we set the parent ticket's merge type to visual. Since the child ticket merged into it no longer exists, the parent ticket should act as a normal ticket that can continue to be merged as needed with any other ticket.
- Do not show collaborator information for merged tickets because their thread is now the parent ticket's
- only do the thread lookup one time to eliminate unnecessary calls
- Adjust getThread and getThreadId methods to account for the merge feature
- getThread adjustments allow us to still see the thread events for child tickets
- make it to where you can merge other tickets to a parent, but the options are locked down for already merged tickets.
Ex: if already separate option, that should be the only option moving forward
- prevents admins from trying to merge tickets together if more than one parent ticket is selected for merging.
- make sure only visual merges allow you to change who is the parent
This commit adds an option for the Agent to delete the child ticket when doing a Separarate or Combined merge. A warning pops up so the Agent knows which Ticket will be deleted.
This commit changes merged Ticket permissions to the following:
If the Agent does not have access to the Child ticket and the threads are merged, they should not be allowed to view the Parent. If the threads are not merged, the Agent should still be able to access the Parent Ticket.
- Change visual flag to separate thread flag. Visual should be the default since messages will route to them the same way they route to unmerged tickets
- Modify code as needed to account for possibly not having a thread when getThread() is called
- UI change to merge ticket template to include Merge Types
- Allow visually merged tickets to be split
- Make thread entries display according to the merge types for Combined and Separate merges
- Make responses to child tickets for combined or separate merges thread to the parent ticket
- When posting a message, we need to check to see if the ticket is a parent or a child, and if it is for a child, which type of merge it is for. From there, we must decide which ticket the message should go to and route it accordingly with the new $ticket variable (instead of using $this).
- Block replies on child tickets
- Create an object type 'C' for child tickets that will allow us to correctly set the extra field for incoming thread entries that were made to children tickets
This commit gives Agents the option to hide children thread entries on parent Tickets using a checkbox on the Merge Tickets modal. If hidden, the Agent is still able to see the related children Tickets in the 'Related Tickets' tab of the Parent Ticket. The thread entries will be hidden by default.
This commit fixes an issue on the order of merged thread entries. We needed to do a UNION instead of a UNION ALL in order for them to show up in the correct order.
This pull adds the option to set the status of all Child Tickets if setting
status of a Parent Ticket. This is helpful for situations like closing a
Parent Ticket and needing to close all Children as well. This option is only
visible when setting the status of a Ticket with Children.
Changes to the new ticket thread preview design. Removes avatars and
makes color changes to the header ticket when collapsed. Thread preview
expands when clicked and collapses when header is clicked.
This commit fixes/cleans up how we do the getChanges function in the FormField class. It also fixes saving/displaying the following field types:
- Multiselect Choices (clearing all options)
- Assignee Field
- Department Field
- Priority Field
Commit af322a41d introduces a new field operator and in an attempt to
simplify how a field and it's operator is split a bug was introduced when a
field with a nested complex name is being split.
This commit reverts to the original "complex" splitter.
The system assumes one entry per day - meaning no individual day chunking is
allowed within the same schedule unless it's an exclusion via a Holiday
schedule on a Business Hours schedule.
Use strict type check comparison when checking if a choice value equals the
default value. This is necessary to allow for choices with numeric zero (0)
as the value.
Adds a routine similar to getClean but forms downstream can use it to return
database ready data. This is especially necessary when UI elements don't
match database fields.
This commit adds ability to add visibility constraint that is dependent on
multiple options. It also addresses cases where constrain is on an existing
or misspelled field.
This commit addresses "Failed to load resource: Frame load interrupted"
thrown by Safari when a url results in a file download by adding a hidden
HTML compliant anchor element to trigger the file download without the
error.
Thanks to @JediKev for the tip.
This commits revisits how export is done by introducing the concept of
exporter with the goal of replacing SQL based exports which are prone to
memory and timeout issues.
Adds ability to create temporary files for the export data which can be
downloaded or emailed to the requester.
This commit adds support for FileObject attachments. It also changes the
routine called to get mime type. This is necessary to avoid conflict in
SplFileObject class extended by FileObject.
This addresses an issue where the system cannot successfully authenticate to
an Exchange server using shared mailbox auth credentials (eg. Username:
`main-user@domain.com\shared-mailbox@domain.com`). The system passes the
entire Username value as the `username` parameter for `imap_open()` and
Exchange fails to authenticate. This adds two new variables called
`authuser` and `username` to class MailFetcher. This also updates the
`MailFetcher::__construct()` method to explode the Username value at the
backslash giving us two parts: the Authentication Username and the Mailbox
Username. If there are in fact two parts we will assign the first part to
the new `authuser` variable and assign the second part to the new `username`
variable. If we detect an `authuser` we will add it to the `imap_open()`
flag called `authuser` and append it to the `srvstr`. In addition this
updates the `MailFetcher::getUsername()` method to return the new `username`
variable instead of the hash table data.
Within a Ticket, if you click the Assign dropdown and choose Agent or Team, the possible assignees are filtered based on who can be assigned to the Department, however, the inline Assigned To option did not filter the possible assignees. This commit ensures that we do filter possible assignees when assigning via inline edit.
This addresses an issue reported on the Forum where visiting the Agent
Dashboard with no Help Topics in the system completely breaks the Dashboard
view and throws a database error `You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right
syntax to use near ') GROUP BY A1.topic_id' at line 1`. This is due to the
statistics code assuming we will always have `$topics` but this is not
always the case, as some people rock their helpdesk without a single Help
Topic. This adds a check to see if `$topics` is empty and if so, we return
the appropriate headers with an empty array as the plot data. This will
avoid the database error and show the appropriate Dashboard view with no
statistics listed under "Topics" tab.
This commit addresses an issue where updating (editing) organization from
User's page resulted in ALL settings getting cleared. The change makes sure
the update is routed to the proper routine.
This addresses an issue where conducting an Advanced Search will show the
results in ASC order (from oldest to most recent) by default. If there are
no keywords the search is supposed to show the results in DESC order (from
most recent to oldest) by default. If there are keywords the search is
supposed to show the results sorted by `relevance`. This adds additional
`select` options to the search criteria for keyword searches so that we can
use `relevance` in the outer query. This also adds an `order_by` to the
tickets to order them by the `relevance` in `DESC` order. In addition this
adds a new `order_by` to sort the results by `created` in DESC if there are
no keywords.
This updates the Installer PHP Requirements from `5.4` to `5.6`. This
updates the `$prereq` variable to be protected and updates depending methods
so they can use the static variable.
This updates all the old, outdated osTicket links in the software. This
includes things like the forum URL, the support URL, the Installation Guide
URL, etc.
This enhances security patch (33ed10) to allow image attachments to be
opened in a new tab if the setting is enabled. This adds a new setting to
the Agent Profile labeled "Image Attachment View" that determines how image
attachments are handled. The two options are "Download" and "Inline" with
"Download" being the default. If the option is set to "Download" all image
attachments will be forced to download. If the option is set to "Inline" all
image attachments will open in a new tab when you right click + open in new
tab.
This addresses an issue reported on the Forum where clicking the "Reset
Permissions" action in the Agent Directory shows a blank popup. Inspecting
the console shows 500 error and checking the error logs shows `Too few
arguments to function` error. This is due to the
`RolePermission::__construct()` method expecting 1 parameter but in
`ajax.staff.php` we are not passing anything to it. This updates
`resetPermissions()` to pass `null` to `RolePermission::__construct()` so
that it doesn't complain and error out.
This addresses an issue where clicking on Config next to a Queue Sort will
show a blank popup. Upon viewing the error logs you receive the error `Call
to a member function asTable() on null`. This is due to defining
`$data_form` inside of the `if ($_POST)` block instead of defining it
outside the block. This updates `SearchAjaxAPI::editSort()` to define
`$data_form` outside of the `if ($_POST)` block so that `$data_form` is
always set.
This commit fixes an issue where trying to save the value '0' to a required short answer field would not save because it did not register that the field contained a value.
This commit fixes an issue where alerts are not sent out to the Admin Email if a Department does not have any primary or extended members.
Now, if the Admin Email is checked for the New Ticket Alert and a Department does not have any members at all, an Alert will still go out to the Admin unless the Department recipients field is set to 'No one (diable Alerts and Notices)'
To make things more clear, an option has been added to have the 'Admin Only' as the recipient, so the Alert will go out ONLY to the Admin if selected and the New Ticket Alert is enabled for the Admin Email.
If 'No one (diable Alerts and Notices)' is selected, no alert will go out at all, regardless of what is checked in Settings | Tickets | Alerts and Notices
This addresses an issue reported on the Forum where setting a password for
an Agent upon creation doesn't save the password in the backend. This means
if you set a password, click Create, and then try to login as the agent you
will be denied access (as there is no password saved). We store the
PasswordResetForm data in the session for later use but we do not actually
use the form data anywhere in the `Staff::update()` method. This updates the
`Staff::update()` method to include a check for the form data and if exists
sets the password and saves it in the backend. This maintains current
functionality where if `Send the agent a password reset email` is enabled
then we do not set the password, instead we send the Agent a registration
email.
In addition, this updates the `StaffAjaxAPI::setPassword()` to include
password validation so if a password is not valid we do not save it.
Instead, we will keep the modal open and throw validation errors until a
valid password is given. This means the form data will not be stored in the
session until we have a valid password.
This addresses an issue where using osTicket from git would show the
incorrect git version in `Admin Panel > Dashboard > Information`. This is
due to a hardcoded git version of `1.8-git`. This updates `THIS_VERSION` to
utilize `MAJOR_VERSION` so that it sets the correct git version. This also
updates the `deploy` CLI module to match the same format (example:
`1.12-git`).
This addresses an issue where creating a ticket with a Due Date set fails
with an error of `Select a time from the list`. This is due to unused
variables in the `Ticket::create()` function. This also improves the
datetime conversion to GMT by using `Format::parseDateTime()` instead of
trying to create a DateTime object directly which also provides a fallback
if an incorrect time. This can correctly determine the timezone (if present)
and return a proper DateTime object.
This addresses an issue where if you’re running an outdated version of the
1.12 series, the latest version it shows available is the latest release of
the 1.10 series. This updates the `MAJOR_VERSION` variable used to check for
the latest release for the series you’re currently on so that it shows the
appropriate release.
This adds the osTicket logo to the `images/` folder so that we don't have to
reference a URL that might change in the future. In addition this updates
the osTicket logo reference in the `README.md` file to point to the new
location.
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.
This code allows users to Manage Collaborators without the page refreshing so that they will not lose any drafts that might not have been saved yet. Instead, adding/removing collaborators will show up instantly in the active collaborators section.
This code also removes the http response from the updateCollaborators function. This triggers collaborators.tmpl.php to correctly update the active collaborators section without needing to refresh the page.
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.
This feature adds a new Print option labeled "Thread + Internal Notes +
Events" that, when clicked, will print the entire Ticket Thread with
Internal Notes AND all of the Thread Events. This also adds a new option in
the Ticket Print Options labeled "Print Events". Previous print options only
included the Thread only or the Thread + Internal Notes, but people want
more! This inserts the events in the correct order just like it is in the
Ticket View. The only difference between the PDF Thread Events and the
Ticket View Thread Events is the styling. In the Ticket View each event has
it's own icon to separate/differentiate them between the others. In the PDF
the events will not have their own icons rather their own background to
separate/differentiate them.
- Use datetimepicker (jquery-ui-timepicker-addon) for Datetime Field with time
selection
- Makes sure the front-end returns ISO formatted date to standardize how dates
are handled
- Fix javascript date format translation from php formats
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).
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.
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.
This addresses an issue with Thai fonts (and a few others like Hebrew,
Arabic, etc.) where printing a PDF will show square characters instead of
the actual content. This is due to `autoScriptToLang` and `autoLangToFont`
not being set to `TRUE`. This updates the mPDF config to set the value of
`autoScriptToLang` to `TRUE` as this formats the HTML using the lang
attribute for the specific language of the content. In addition, this
updates the mPDF config to set `autoLangToFont` to `TRUE` as this selects
the correct font to use for the specific language of the content.
https://mpdf.github.io/fonts-languages/automatic-font-selection.html
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.
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)".
It's all about the single quotes baby! Apparently I can't read; the single
quotes are only meant for word options such as `'self'` and `'none'`. When
adding single quotes to the `<host-source>` options it takes them
literally…too literally. For example, if your options are `'localhost:80
localhost:8080 localhost:8000'` then `'localhost:80` and `localhost:8000'` will
be seen as "invalid" due to the single quotes. This removes the single
quotes from every line that sets the CSP so all options are valid. This also
adds single quotes around the `self` option so it stays valid as well.
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.
If an alert is enabled for only the Department Manager and the Department Recipients field is set to No one, the Department Manager still receives a notification.
If the recipients field is set to no one, nobody should receive an alert regardless of what is checked on the New Ticket Alert selections.
To fix this, we can do a count of what the getMembersForAlerts function returns. This function compares what is set for a Department's group_membership in the database to the ALERTS_DISABLED constant to return a query set of members that should receive an alert. If the count is 0, we know that alerts should be disabled.
This fixes an issue where, for task threads, if an agent has the thread edit
permission, the agent was neither able to edit his or her own entries, nor the
entries of other agents.
This addresses issue 4909 where setting a translated Form Instruction fails
to render properly on the client side. This is due to us formatting the
instructions but not decoding before we render. This adds the decode method
to the translated Form Instructions so they are rendered properly on the
client side.
If you have a custom field that's based on a list and the default value is set to a list item where the extra field is empty ('') instead of NULL, you cannot set the default value back to 'Select a Default'. You CAN set it to other default values
Extra is set to empty if you erase the abbreviation and save it. Should save as NULL instead of empty
Note: for some reason this didn't work
if ($k == 'abbrev' && empty($vars[$k]))
$this->set($v, NULL);
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.
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.
This commit fixes an issue where Tickets were not being assigned to the last respondent if ‘Claim on Response’ was disabled and a Ticket was reopened.
Now, a new option has been added on the Department level to Disable auto assign on reopen if desired.
This commit ensures that an Agent with the 'See all tickets in search results, regardless of access' permission checked can see all Tickets in a search or a saved search, but does NOT see all Tickets within queues.
This updates the variable name that determines if the current PHP version is
5.6+ from `$php56` to `$php56plus`. This will help other understand better
what the variable is/does.
This addresses an issue reported on the Forum where adding a new Sort Option
for Queues without a title fails without error. This is due to the
queue-sorting template that uses a new instance of the
`QueueSortDataConfigForm` form from a new instance of `QueueSort` rather
than the existing form with existing POST data/errors when a POST is
submitted. This updates the queue-sorting template to use the already
available `$data_form` form instance. This also adds an if statement to set
the `$data_form` if one doesn’t exist (this only applies to new modals
without a POST).
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.
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.
This addresses a vulnerability found by [AkkuS CW](https://pentest.com.tr)
where a simple XSS attempt can lead to an LFI (Local File Inclusion) attack.
The issue stems from the system returning the unformatted file contents in
an error message when uploading a CSV to the User Importer. This formats the
contents before uploading so that if the contents are returned in an error
message they will not be executed by the browser which therefore prevents
XSS attempts and the possibility of an LFI attack. This also formats all the
user-created data sent to ImportError to prevent the same issue.
This commit fixes an issue with queues or searches that have a criteria for team assignment when the Agent is not assigned to any teams. In this case, the queue should not return any tickets. Previously, it would create an invalid query which would cause system errors.
This addresses an issue reported on the Forum where `API Unexpected Data`
warnings are appearing in the system logs for the `thread_entry_recipients`
and `system_emails` keys for piped emails. This is due to the API request
validator that checks the keys of the API data; if a key's data is an array
itself it loops through the validator again to check the key(s) inside the
data array. This is fine for most keys but for the `thread_entry_recipients`
and `system_emails` keys the request structure does not contain the
necessary sub-keys to validate the data keys. This adds the necessary
sub-keys to the request structure so that `thread_entry_recipients` and
`system_emails` data keys can be validated.
This addresses an issue where having the `%{task.due_date}` variable in a
Task alert template whilst creating a Task with an Assignee causes a fatal
error in the backend leaving the Create Task modal spinning forever. This is
due to the `getVar()` method for Tasks where the `due_date` case references
a non-existing method. This updates the referenced method to an existing
method so it gets the correct value and does not cause a fatal error.
This addresses an issue where `.eml` and `.msg` files on incoming mails are
being dropped. This is due the the mail fetcher that tries to process
`.eml`/`.msg` files and adds them as thread entries rather than adding them
as attachments. This adds a new section that utilizes a new method to fetch
the body of `.eml`/`.msg` files, fetches the subjects of the `.eml`/`.msg`
files as the attachment names, and creates attachments. This preserves the
`.eml` and `.msg` files and adds them to the pertinent thread entries as
attachments.
This adds a new feature called ACL that offers the ability to control what
IP addresses are allowed to access the system. This adds a new textfield to
the System Settings to add a comma separated list of IPs. This also adds a
dropdown labeled "Apply To:" that gives you the option to choose which
panel(s) the ACL will apply to. Lastly, this adds a validator for a simple
comma-separated list of IP addresses. (eg. `192.168.1.1, 192.168.2.2,
192.168.3.3`)
If the requester's IP is not in the ACL the system will show an "Access
Denied" page. If the requester's IP is in the ACL they will be able to
access the system as usual. If the ACL field is set to Disabled, anyone will
be able to access the system.
This adds an initial failsafe where if the Admin's current IP address is not
in the ACL upon saving the system will refuse to save the setting to prevent
the Admin from being locked out. This also adds another failsafe where if
there is an "Apply To:" option set but there are no IPs provided the system
will return an error letting the Admin know they have to insert an IP
address to continue.
This addresses issue mentioned in 4071 where the choice field validation is
not accepting punctuations. This updates the regex to accept anything the
user inputs. This introduces another issue that if the choice contains `:`
in the value then it will truncate everything after. This is due to the
explode method that explodes on any `:` character. This updates the explode
method to return only 2 values which only explodes on one `:` character
which returns the full value.
It's all about the single quotes baby! Apparently I can't read; the single
quotes are only meant for word options such as `'self'` and `'none'`. When
adding single quotes to the `<host-source>` options it takes them
literally…too literally. For example, if your options are `'localhost:80
localhost:8080 localhost:8000'` then `'localhost:80` and `localhost:8000'`
will be seen as "invalid" due to the single quotes. This removes the single
quotes from every line that sets the CSP so all options are valid. This also
adds single quotes around the `self` option so it stays valid as well.
This commit fixes several issues with how we manage FAQs and related objects.
1. When trying to add a Help Topic to an FAQ, we should add the record to the faq_topic table after saving the faq so that we can accurately retrieve the faq_id
2. When deleting a Help Topic, we need to make sure we're using the topic->delete function rather than deleting based on a QuerySet so that the related FAQ Topics will also be deleted.
3. When deleting a FAQ Category, we need to ensure that we delete all related FAQs and FAQ Topics. To do this, we should use the delete function from the FAQ class first to delete all related FAQs and FAQ Topics and then we should use the Category delete function to delete the remaining Category (remove faqs->expunge from the category->delete function since it we now pass through faq->delete as well)
This addresses an issue in v1.11 where sending an Access Link via email to a
Collaborator fails with fatal error. This is due to the type of User class
that is sent to the `Mailer::send()` function. The ClientSession User class
is not appropriate for this method, rather, TicketOwner or Collaborator User
classes are appropriate. This adds a function called `getSessionUser()` to
the ClientSession class so we can retrieve the TicketOwner/Collaborator User
class from the session.
This addresses an issue where entering a collaborator's email to send ticket
email access link throws a fatal error. This is due to the method that
checks for tickets with the User's email equal to the email provided. This
only checks for User's emails not Collaborator emails. This adds a check for
Collaborator emails as well so this will not crash out.
1. Task Exports: This commit fixes the contructor for printing Tasks using MPDF
2. PDF Formatting: This commit fixes an issue where the header of each thread entry did not stretch across the page correctly. This was an unintentional side effect of trying to fix the way HTML tables printed in PDFs.
3. FAQ PDFs: This commit passes the correct values to mPDFWithLocalImages when printing FAQs
1. Task Exports: This commit fixes the contructor for printing Tasks using MPDF
2. PDF Formatting: This commit fixes an issue where the header of each thread entry did not stretch across the page correctly. This was an unintentional side effect of trying to fix the way HTML tables printed in PDFs.
This addresses an issue where clicking Export on an Organization's Tickets
will export a file with the filename of 'csv' and no extension. This is due
to the variables we are passing to the `saveTickets` function. We are
missing a variable called '$fields' that contains a list of fields.
This commit fixes an issue where custom export headings were being set to numeric values rather than field labels.
For exports that are already saved, we can get the heading directly using getHeading. To get the heading for fields that are not already saved as exports, we can use getExportableFields, which will return path => heading.
This addresses the "Call to getAllowIframes() on NULL" error on installation
pages. This is due to 4781 that introduced the concept of allowing multiple
iFrames, where we are not checking for `$cfg` before calling the method.
This adds a check for `$cfg` so the errors do not occur.
This addresses an issue where Korean text is stripped from the body. This is
due to the strip_emoticons function, as Korean text is in the same unicode
range as some of the emojis.
This addresses an issue introduced with 4737 where using `%{ticket.thread}`
causes a fatal error. This is because `ObjectThread->asVar()` returns an
object which cannot be converted to a string. This adds a `__tostring()`
function to class ThreadEntries so it can be converted to a string properly.
This commit fixes an issue where only the saved export fields would export, whether you checked more fields to export or unchecked some of the saved fields.
For any fields not saved that need to be exported, we need to find their label and then put it in the fields array. For any saved export fields that are unchecked, we need to compare what was checked vs what is saved and then unset the fields that were unchecked.
This pull adds the ability to choose between ASC or DESC order for the
complete thread variable. If `complete_asc` is chosen the system will order
the thread in ASC order, if `complete_desc` is chosen the system will order
the thread in DESC order. This keeps backwards compatibility with just
`complete` as some people might forget to update this for a while.
This commit fixes an issue where checkboxes could not be edited for inline edit or all field edits.
When a BooleanField is directly passed to the to_database method, you are not able to accurately check to see if old != new. To fix this, I added a new getChanges method to the BooleanField class that will first do a comparison on the raw boolean value (true, false) and then get the value needed for the database. I then made sure that we use that new function when editing all fields together.
Additionally, I added a getClean method to the BooleanField class so that $this->_clean for the field would be set to either true or NULL depending on if the box is checked or not and would accurately save to the database when calling $form->saveAnswers()
This commit fixes an issue where we were not checking the restrictions on Ticket assignment correctly. isAccessLimited returns true if showAssignedOnly is true, so we wouldn't want to negate the isAccessLimited check (that would return true if access is not limited).
Also, if an Agent's access is limited to assigned tickets only, we can return the assigned tickets once we have them without needing to go through any further processing.
Finally, we should still allow an agent to view an assigned ticket even if the ticket is closed.
Note: queue counts update themselves a little after you toggle the 'Limit ticket access to ONLY assigned tickets' check box. The 'See all tickets in search results, regardless of access' still works correctly as well.
Make the following work:
- Assigned
- Assignee
- Department Manager
- Assigned Team
Also, make sure we account for if there are no choices available for a quick filter Ex: The helpdesk does not have any teams
This commit fixes an issue where using MPDF to print Tickets did not work if the PHP version was < 7.0 because MPDF called the random_int function which is only available for PHP 7.0+. Now, we check the PHP version before printing, and if it is less than 7.0, we use the rand function. If it is >= 7.0, we continue to use the random_int function.
This addresses an issue where clicking print on a Task throws a fatal error.
This is due to the Task2PDF function passing a string instead of an array to
`Mpdf::__construct()`. The `__construct()` of class Mpdf requires an array
of configurations so we are now passing an array instead of a string.
This addresses issue 4810 where having more than one language installed and
trying to add a new FAQ Category with a Parent Category relation fails to
add the Parent Category relation. This is due to multiple Select2 fields;
the POST data includes only the last Select2 field's value instead of the
one in the tab you're currently on. This adds a script to set all Select2
fields in all the available languages to the same value so the POST will
always contain the appropriate Parent ID no matter what language tab you’re
on.
This addresses issue 4803 where sorting by Users on Organizations does not
sort properly. It sorts by name instead of the User count. This corrects the
value in the `$sortOptions` array from `users` to `user_count`.
This commit fixes 2 issues we had with using MPDF to export Tickets:
1. Tickets with inline images
To refer to images as var:varname, imageVars needs to be set for the MPDF object.
2. Tickets with tables
When exporting a Ticket where a Thread Entry contains a table, we must ignore table percents and table widths, otherwise, it will always throw the error "Word is too long to fit in table"
This addresses an issue mentioned in the forum where having more than one
custom field on a ticket shows the same title for all forms on the
client-side ticket view (after creation). This adds an array of the form
names indexed by sort order and displays them in the correct order with the
correct names.
Previously, we added a security header to prevent click-jacking called
"X-Frame-Options". This introduced an issue with people using osTicket in
iFrames on their websites. To mitigate the issue, this updates the security
header to allow the site to be framed from specified domains, if none
provided we default to 'self'. This adds a new field to General System
Settings called "Allow iFrames" where you may enter a comma separated list
of domains that the site can be framed on. This also adds a validator for
the field to validate the domains and ensure they fit the <host-source>
syntax from [Mozilla Developer
Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors#Sources).
This addresses an issue reported on the Forum where creating a new FAQ and
not filling out required information returns the correct error but returns
the incorrect template (FAQ View Template). This is due to the check for an
FAQ when determining the template to return. This adds a check for the FAQ
ID to determine if it’s an actual FAQ or just a model instance.
This addresses an issue reported on the forum where searching for a keyword
in FAQ search brings back more results than it should. This is due to the
format of the query selecting the results, essentially, the `WHERE NOT`
statement is not properly formatted so the `OR` statements take precedence
over the `WHERE NOT` causing non-public results to be shown to the client.
The `WHERE NOT` statement contains the bit to select from only public faqs
and since the `OR` takes precedence it will return the non-public results
too.
This addresses issue 4756 where the `%{recipient.ticket_link}` variable is
not being replaced when the canned response is loaded in the reply box; all
other link variables work. This is due to the recipient object not being
passed to the variableReplacer which means the ticket_link is not available.
This adds the recipient object to the variableReplacer so the ticket_link
variable is properly replaced like the others on load.
This addresses issue 4716 where updating a Ticket Status throws a fatal
error of "Too few arguments" when using PHP 7.2. This is due to `$errors`
not being passed to the `update()` function causing PHP 7.2 to freak out.
This creates an `$errors` array and passes it to `update()` so PHP 7.2 is
happy and we are all happy. :)
This addresses issue 4743 where the system ignores Internal Notes on Ticket
Creation. This is due to the ticket being assigned and not having the
Internal Note passed along.
This addresses issue 4579 where setting a Custom Column to User Organization
and choosing the User Org Link filter the system shows the wrong link to the
Org. This is due to "scp/" not being added to the URL therefore showing an
invalid link.
This addresses issue 4720 where creating tickets via CLI fails to set a
status and crashes with an "APC must be enabled" error. This adds a check to
see if the APC module is loaded before continuing.
When going to my closed queue, I had the same ticket showing multiple times. This commit moves the call to the distinct method outside of any if statements so that the tickets will always be grouped by their id.
This addresses issue 4725 where there is no save button when editing a quick
note. This is due to the jQuery update which changed how a few things work
with redactor.
This commit fixes an issue where we failed to upload attachments on Information Fields. In the to_config function, we were only taking the array_values of attachments which would return an array with only the file name ([0] => 'filename') instead of an array with the file id and file name ([123] => 'filename').
Now, when we pass the keepers to keepOnlyFileIds, we have a file id that can be passed to the upload function.
This addresses issue 4700 where local avatars where breaking queues with
Avatar Annotation. This is due to the local avatars not having a `setSize()`
function. This updates local avatars so that they can be resized.
This addresses issue 4718 where deleting a plugin using PHP 7.2 throws an
error. This is due to errors not being passed to uninstall which causes the
"Too Few Arguments" error.
With the patch introduced to fix the `afterShow` event for jQuery three,
this appear sort of slowly be default. This addresses the issue by providing
a default of 0ms to show things, so they show immediately.
This fixes an issue introduced in the upgrade to jQuery three. The filedrop
field was not updated correctly and drag and drop files was broken.
Additionally, this handles cases where files are dragged over the box but
not dropped. The style of the box is correctly reset after the drag leaves
the box.
This addresses an issue where the system banlist throws the error "SYSTEM
BAN LIST filter is DISABLED". This is due to the Filters moving to ORM but
not updating everywhere they are used.
This addresses an issue where people are getting the incorrect time on
tickets even though they have all the timezones set correctly. The
current MySQL variable the system uses to determine the timezone is
`system_time_zone`. This variable is set by the server and sometimes
cannot be updated properly (or cannot be updated at all). This changes
the variable from `system_time_zone` to `time_zone` so if in the event
the system returns the incorrect time and they can’t update the server
timezone properly, they can just change the `@@global.time_zone` and
`@@session.time_zone` MySQL variables and should get the correct time.
This addresses an issue on the forums where having a comma in your number
format (instead of periods) would crash the system if using a language pack
other than English. (Fix suggested by @rspma on the forums.)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.