openprovider / Openprovider-WHMCS-domains

Openprovider WHMCS Domain Module
42 stars 31 forks source link

searchPromoMessageRequest abuse #269

Closed willdashwood closed 1 year ago

willdashwood commented 1 year ago

Just had an email from OpenProvider.

We have seen a high number of identical "searchPromoMessageRequest" calls to our API from IP address [redacted]. These calls contained the following parameter(s): "[]". In order to prevent any problems we have temporarily disabled API access for username "[redacted]".

I don't call searchPromoMessageRequest in any of my custom scripts. I'm not even sure what it does. But it is referenced in this WHMCS module in several files:

modules/registrars/openprovider/Controllers/System/ConfigController.php modules/registrars/openprovider/OpenProvider/API/API.php modules/registrars/openprovider/OpenProvider/API/ApiHelper.php modules/registrars/openprovider/OpenProvider/API/CommandMapping.php

What is it for? How is it being abused? Is it, for example, the name spinner or WHOIS lookup service?

sapillai commented 1 year ago

Hi @willdashwood,

Our apologies for the difficulties you had with the WHMCS module sending too many searchPromoMessageRequest requests.

When you access the WHMCS admin dashboard, a widget displays the number of domains, your account balance, and a promo message. The module uses the API call searchPromoMessageRequest to check the promo message.

When browsing through the domain list as an admin, many Openprovider instances are launched. Each instance makes a request to Openprovider to validate the token. To prevent WHMCS from sending too many searchPromoMessageRequest API calls, we added a single page cache feature to the module and this cache reduces the number of requests to just once per page load. You can use the single-page cache fix to put a stop to the module making too many searchPromoMessageRequest calls. To apply the fix,

Please test and let me know if you encounter any issues.