Support

Admin Tools for WordPress

#37307 Admin Tools appears to be blocking API call to WordPress via cURL

Posted in ‘Admin Tools for WordPress’
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

WordPress version
5.9.3
PHP version
7.4
Admin Tools version
1.5.7

Latest post by tampe125 on Friday, 17 June 2022 10:20 CDT

RakataTech

Hi

We have found that since installing Akeeba Admin Tools we are unable to perform API calls to WordPress via curl.

The calls were working before we installed Admin Tools and also work if we disable Admin Tools. The calls continue to work if done from using the URL in a web browser, but not via cURL.

A thought we had whas that this could be being blocked by the htaccess file as it may be seen as a user agent that was being blocked, but that parameter is not on in the htaccess maker area. Indeed we have tried disabling the Admin Tools htaccess file to see if it was being blocked by something in that, but that made no difference to this issue. We are running on the assumption it is not something in the htaccess maker side of Admin Tools.

We have been through all the screens we can think of in Admin Tools, but cant see a setting to change to fix this.

Any suggestions on how we can let though the cURL request?

tampe125
Akeeba Staff

Hello,

the only feature that can block a cURL request is the option to block specific user agents. Is that enabled in the Htaccess Maker?

If you still have issues, can you please try to disable Admin Tools plugin and try again? When you disable the plugin all the code inside the htaccess file is removed, so it's completely disabled.

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!

RakataTech

Hi Davide

Many thanks for the speedy reply. We noted in the original ticket that if we disable Admin Tools the cURL requests works fine. We also noted that the user agent block feature of the htaccess maker part of the system was disabled. Attached in a screenshot to be sure we are talking about the same place.

When the cURL requests are blocked we get the message "You are a spammer, hacker or an otherwise bad person." returned which is the message from Admin Tools as far as I know.

Kind regards

 

tampe125
Akeeba Staff

Ok, this means that the request is blocked by the plugin, not the htaccess file.

Can you please try to trigger the error again, then get inside the Blocked Requests Log and take a look at the reason for the block?

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!

RakataTech

Aha !  Many thanks Davide. That led me to find the issue. Easy resolution once I found the reason.

The call was not coming from the IP address I was expecting it to have come from and the Admin IP Whitelist didnt have the IP address in it, hence was blocking it. I have added the additional IP to the Admin IP Whitelist and the cURL requests go through.

tampe125
Akeeba Staff

Awesome! Thank you for the update!

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!