The reason is "Admin Query String". I have no idea what it means and how to whitelist it.
Okay, that's what I thought.
You have enabled the Administrator Secret URL Parameter in Web Application Firewall, Configure WAF. This means that this parameter needs to be used whenever you access the administrator/index.php
file without being already logged in. This, of course, includes the CRON jobs.
Change the CRON job URL to include the Administrator Secret URL Parameter. For example, let's say your Secret URL Parameter is specimen
. Your CRON job URL goes from this:
https://example.com/administrator/index.php?option=com_csvi&view=import
To this:
https://example.com/administrator/index.php?option=com_csvi&view=import&specimen
Further to that, it's very likely that you have automatically blocked your site's IP address since that is what is used by the CRON job which is getting automatically and repeatedly blocked.
Go to Components, Admin Tools, Web Application Firewall and click on Unblock an IP. Enter your server's IP address. If you are not sure, ask your host. Click on Unblock This IP.
Then, again, go to Components, Admin Tools, Web Application Firewall and click on Unblock an IP. Enter 127.0.0.1
. Click on Unblock This IP.
The App Developer also suggested that the .htaccess file may caused the problem.
This might also be the case.
You gave me a URL, and you tell me there is a CRON job. A URL is not an executable. You have to use an executable program to access it. Typically, it's either wget
or curl
. If it's the former go to Components, Admin Tools for Joomla, .htaccess Maker and find the “User agents to block” setting. There's WGet in there; click on the X button next to it to remove it. Then, click on Save & Create .htaccess.
I would like to stress that none of that would be an issue had the developer of this extension been using Joomla the way it's supposed to be used (which, admittedly, has never been put down in writing for stupid reasons; it's a long story), instead of him creating an ad-hoc automation method. Here are some pointers I would urge you to share with him:
- The
administrator/index.php
entry point is to be used ONLY for user-interactive, authenticated backend access. It must never be used for unauthenticated access, including automation; that's a violation of the implied trust model of the Joomla Administrator Application.
- At the most basic level, Joomla has included
com_ajax
the past 12 years to accommodate for components, plugins, modules, or even templates in need of unauthenticated, unattended access. So, even back in Joomla! 3 he had no excuse using an ad-hoc, security model violating automation method. I am not suggesting he should use that; there are newer, more appropriate automation methods in modern versions of Joomla.
- Joomla! 4 and later includes the Joomla CLI Application (
cli/joomla.php
) which allows the developer to create console
plugins to extend it. This is meant to be the primary way to offer automation through CRON jobs.
- Joomla! 4.1 and later includes the Scheduled Tasks feature which allows the developer to create
task
plugins. These can be used to create automation tasks, either scheduled to run through Joomla itself, or be run through a CRON job (CLI or URL). This is meant to fill the automation gap for servers which do not allow the aforementioned Joomla! CLI Application to be used in CRON jobs.
The extension's author should have implemented the latter two. If he needs to remain compatible with Joomla! 3 he can use com_ajax; it's not the best choice for Joomla! 4.0 and later, but it still works and it's much more secure than what he's currently doing.
Everything I described I use and have –obviously, as per the links above– documented myself. I will be happy to help him out if he wants. My blog site, in the links above, has a contact form where he can contact me. I don't charge for helping out fellow developers. I view it as an investment into the welfare of the Joomla community which, ultimately, benefits all of us who work with or on Joomla.
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!