Support

Admin Tools

#41747 Access Denied error - Continues

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
Joomla! 5.2.5
PHP version
8.2.28
Admin Tools version
latest

Latest post by marcw on Tuesday, 25 March 2025 12:20 CDT

marcw

Hello,
This problem comes and goes, so it has been difficult to solve.  I think I know what's going on, but I am still unsure of the best way to handle it.

The Access Denied message is the custom one I set up under Configure WAF > Customisation > Custom Message. Also, Show errors using a customizable HTML template is set to YES, and Send troubleshooting email on administrative functions is set to YES.

When there is an attack (we have many), the Custom message is displayed and cached by the System, so for however long the Cache Time is set, everyone gets the Access Denied message.

As per your instruction, the Platform Specific Caching is set to NO.  When I go into System - Page Cache, the Use Browser Caching is set to YES, and I can't find a setting for Exclude Menu Items because, on every page, the Navigation section is template-based and used on every page starting with the Home page which is attacked the most.  No matter what I enter, the site becomes un-cached and very slow.  I had the Cache Time set to 30 minutes, which caused the site to be unavailable to everyone for that length of time.

So far, my only choice has been to turn the Cache Time down to 5 minutes (which is not really a solution). I'm not sure what to do because my understanding was that when WAF restricts Access, the Custom Message echoed should not be cached in the first place. There must be a solution, but I haven't been able to find it.

What do you think I should try next?

Thank you for your time and attention to this matter,
marc

nicholas
Akeeba Staff
Manager

The option I told you about is shown when you edit the System - Page Cache plugin. It is hardcoded in the plugin's XML manifest file. Are you sure you are looking at the right place?

Furthermore, I really need to know what the Reason and Target URL of your blocked requests are for the pages which appear to be caching an error response so I can try to reproduce this problem.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager

As I submitted my reply, I had an epiphany as to how to reproduce the issue. From there it was fairly easy to figure out what to do, thanks to having spent an entire day last week battling the System - Page Cache plugin for an unrelated problem I had with it.

Please try installing the following: https://www.akeeba.com/download/admin-tools-professional/7-7-1-dev202503171120-rev32c63579.html. Clean the cache and your problem will be fixed (permanently).

The problem here was that the method we were using does not lead to Joomla caching the component output using the Conservative and Progressive cache. However, if the System - Page Cache plugin is ALSO enabled, the plugin caches the entire page even though the component output is not supposed to be cached on that page. To tell it not to cache the entire page we need to handle the onPageCacheSetCaching event and return false from it when we detect that an error page is being displayed.

There's a catch. There are some rare cases where Admin Tools will block a request because a module would handle poisoned data. If this happens, the workaround does not work. If you run into this very rare issue you have to simply NOT use the custom error page option in Admin Tools. There's no way around it.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

marcw

Thank you very much. The update is installed, and the cache time has been set back 30 minutes, so we shall see.

 

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!