Page 1 of 1

Downloading Attachments While in Maintenance Mode

Posted: Mon Dec 07, 2015 7:38 pm
by mkoch227
The following bug report came to Mods for HESK:
When I switch on maintenance mode the attachments in the tickets are resulting in dead links or sql errors for the admins.
I took a quick look at download_attachment.php, and there is this code block for checking if maintenance mode is enabled:

Code: Select all

// Are we in maintenance mode? (check customers only)
if (empty($SESSION['id'])) {
    hesk_check_maintenance();
}
This appears to be an issue since sessions are stored in the $_SESSION superglobal, and not $SESSION. Therefore, it appears that HESK is always checking if it is in maintenance mode, even if the user downloading the attachment is not a customer.

Re: Downloading Attachments While in Maintenance Mode

Posted: Mon Dec 07, 2015 8:02 pm
by Klemen
Thanks, will fix this in the next minor update (in the next days, just need to finish testing HESK on final PHP 7).