Page 1 of 1

Forbidden error when saving email templates in control panel

Posted: Fri Sep 06, 2024 7:39 am
by Lewis7362
Script URL: [removed for privacy]
Version of script: Latest, installed a few days ago
Hosting company: eUKHost
URL of phpinfo.php: [removed for privacy]
URL of session_test.php: [removed for privacy]
What terms did you try when SEARCHING for a solution: "Hesk edit template forbidden"

Write your message below:

When trying to edit a template through the control panel, upon submitting the template, I get a Forbidden error from the server.

I am unsure what is causing this. I tried changing all of the email template files to CHMOD 777 temporarily to see if it was a permissions issue, but the problem continues.

Interestingly I can save the forgot_ticket_id plain text template fine, but the HTML one of that, or the plain or HTML of other ones I have tried, are forbidden.

There is nothing in the server error log.

Thank you for any assistance.

Re: Forbidden error when saving email templates in control panel

Posted: Fri Sep 06, 2024 3:57 pm
by Klemen
This is most likely Mod Security (or a similar software application firewall) blocking the requests to the server based on arbitrary rules.

You will need to check with your hosting company why it is blocking the request and ask them to adjust or disable that Mod Security rule for your Hesk (several Mod Security rules may be triggered, depending on their set up).

Re: Forbidden error when saving email templates in control panel

Posted: Fri Sep 06, 2024 4:06 pm
by Lewis7362
Klemen wrote: Fri Sep 06, 2024 3:57 pm This is most likely Mod Security (or a similar software application firewall) blocking the requests to the server based on arbitrary rules.

You will need to check with your hosting company why it is blocking the request and ask them to adjust or disable that Mod Security rule for your Hesk (several Mod Security rules may be triggered, depending on their set up).
Thank you so much. I disabled it in the control panel and the functionality worked immediately.

I have been having trouble with another script as well, and I'm wondering if it has been caused by this same thing... Out of all the things I would have thought about, I simply would have not considered modsecurity

It makes sense though, as I moved from my own server to a shared one where obviously I cannot control the specifics of modsecurity, and I have no idea how aggressive their rules are

Thanks again

Enjoy the coffee !

Re: Forbidden error when saving email templates in control panel

Posted: Fri Sep 06, 2024 5:39 pm
by Klemen
Glad to hear that worked!

Thank you for the coffe. It was not required, but I do apreaciate it.

Re: Forbidden error when saving email templates in control panel

Posted: Fri Sep 06, 2024 6:33 pm
by Lewis7362
Klemen wrote: Fri Sep 06, 2024 5:39 pm Glad to hear that worked!

Thank you for the coffe. It was not required, but I do apreaciate it.
It's the least I can do to thank you for an excellent script that is free. Hesk Cloud is too expensive for my use case :P

And wouldn't you know it... I tried my forms script that wouldn't let me save edits before and after ModSecurity, and sure enough, it worked!

I would have been chasing that for ages with support, thinking permission or database errors, so you've saved me at least £5 worth of time!

Thanks again for your help and being available here for everyone!