Support

Admin Tools

#40456 /fr/component/chococsv?task=csv.deploy throwing an error msg only when Admin Tools is enabled

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
4
PHP version
8.2
Admin Tools version
latest

Latest post by woluweb on Thursday, 21 March 2024 05:56 CDT

woluweb

Hi Nicholas & team !

I am working with a new Component (allowing to import Articles and their Custom Fields from a CSV file using the Joomla API, so you know the context :) )

 

The SEF url is /fr/component/chococsv?task=csv.deploy

The non-SEF url is /index.php?option=com_chococsv&task=csv.deploy&lang=fr

 

That url works fine as long as Admin Tools is disabled (Component & System Plugin to be precise).

But as soon as I enabled Admin Tools it does not work any more.

 

I tried to disable about all Options in the WAF, or even to create a "WAFexception" 

- either with "component=chococsv" + "viewname=csv"

- either with "component=ALL" + "viewname=/component/chococsv?task=csv.deploy"

but I am still facing the issue.

 

What am I missing? Txs!

 

Note: even before doing all this, I reverted the .htaccess to Joomla's original one, so htaccess is not the cause

 

tampe125
Akeeba Staff

Hello,

first of all, we'd need what's the reason for the block. After you get the error, can you please get inside the Blocked Requests Log and check what was the reason for the block?

Then we can work on how to improve it.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

woluweb

Sorry, I should have mentioned that as well in my description of the issue : the thing that the most recent item in the "Blocked Request" dates back from 2024-03-06 03:58:09 CET (not today !)

So that is why I had no clue of what was causing Admin Tools to block...

tampe125
Akeeba Staff

Ok, we have to understand if the block is caused by the system plugin or the .htaccess file.

Enable everything and generate the .htaccess file with the Htaccess Maker. You should be blocked.

Replace your current .htaccess  with Joomla default one. Are you still blocked or not?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

woluweb

Good point, the .htaccess, but as stated above even before starting anything I had switched back to the native Joomla htaccess in order to avoid unnecessary tests atm

So all what I explained has always been with the basic native joomla htaccess :)

tampe125
Akeeba Staff

Just to be sure, can you please test your component with the latest version of Admin Tools?

Moreover, can you please double check inside the WAF configuration which reasons are listed for not being logged?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

woluweb

Txs for your kind follow-up Davide.

Here are my answers:

1. Admin Tools is already the latest version, namely 7.4.9 Pro (I have just re-installed 7.4.9 Pro on top of my current 7.4.9 just to be sure, but the issue is still there)

2. The option "Do not log these reasons" is empty (ie nothing is selected to be excluded)

 

If easier for you than guessing, we can also share screen one of these days or I can give you credentials.

woluweb

I checked the everything.php logs and I saw the following

 

2024-03-19T15:51:35+00:00 CRITICAL 185.221.182.109 error Uncaught Throwable of type Exception thrown with message "We detected that your latest request may have been part of suspicious activity and has been blocked. If you believe you are getting this message in error please let us know through our site's contact form.". Stack trace: #0 [ROOT]/plugins/system/admintools/src/Extension/AdminTools.php(754): Akeeba\Plugin\System\AdminTools\Feature\IPDenyList->onAfterInitialise()

So I thought that adding 185.221.182.109 in the "Site IP Allow List" would do the trick.

But no...

Then by chance I went to Site IP Disallow List"... and 185.221.182.109 was also present ("blocked after 3 times").

And now it seems to work.

So could it be that the "green list" has lower priority than the "red list"?? (I don't even know why my own IP was considered as a security issue in the first place, but that's another topic. I don't know what it triggered bc the last mention in Blocked Request Log dates back from "2024-03-06 03:58:09")

tampe125
Akeeba Staff

Ok, let me know if you need further assistance on that. Please note that you can turn on logging to a file, so you'll get the full request and why a request has been blocked.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

woluweb

Txs Davide,

1. my last question

So my last question was : "So could it be that the "green list" has lower priority than the "red list"??"

2. my question related to your answer

Where precisely is that option "logging to a file"?

3. my new question

Also, there are two places to white-list my own IP (either within the WAF Configuration, either directly via its own button). What is the difference between both??

tampe125
Akeeba Staff

The white list should be applied before anything, I didn't check about having both the IP in both lists, though.

Regarding logging to file, you can find that option in the Configure WAF page, in the Logging tab.

Regarding the white list, there are two places: in the Configuration WAF with "Never block this IP" and the Administrative Exclusive Access. The first one means that the IP will never be blocked, even if it raises a security exception, the second one means that Admin Tools will completely shut off when the request comes from that IP, since it's a trusted one.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

woluweb

Txs Davide.

Issue is solved and now everything is clear :)
I close the ticket.

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!