centralnicgroup-opensource / rtldev-middleware-whmcs

CentralNic's WHMCS Software Bundle
https://centralnicreseller.com
Other
38 stars 15 forks source link

modules/registrars/cnic/hooks.php breaks configuratessl.php for other modules #282

Open cenourinha opened 5 days ago

cenourinha commented 5 days ago

Describe the bug

We use GoGetSSL WHMCS Module to provide SSL Certificates to our customers and after recently updating the CNIC modules in our WHMCS instance, our clients started getting errors when generating their CSR.

After hours of debugging, we were able to identify that this situation was being caused by the file modules/registrars/cnic/hooks.php in your module.

We are both Central Nic Reseller (previously rrpproxy) and Hexonet domain resellers, but have no interest in resell your SSL Certificates. Please make sure your modules changes don't mess with other modules functionality.

Additionally, please consider open sourcing your modules. This will make it easier to customize, debug, or fix potential problems that may be caused by them.

KaiSchwarz-cnic commented 5 days ago

Good Morning!

After hours of debugging, we were able to identify that this situation was being caused by the file modules/registrars/cnic/hooks.php in your module.

Some more details in that regard? What did you identify there? Any errors you might have seen on screen? Log entries? tblerrorlog? screenshots? Platform details (as mentioned in the bug template)?

after recently updating the CNIC modules in our WHMCS instance, our clients started getting errors when generating their CSR.

That means? what was your earlier version in use? which version are you using now?

Please make sure your modules changes don't mess with other modules functionality.

That's what we usually do, but as we are all human ... That's also why it is that important getting such issues reported in more detail (as far as possible). There are tons of other modules on the market and finally, there's also WHMCS Core. Testing everything is by that impossible. We noticed for example that WHMCS Core is for example implementing some ClientArea hooks in a way that doesn't avoid collisions. Means Provider A can override Provider B's returned data. Do you mind providing more input therefore?

Additionally, please consider open sourcing your modules. This will make it easier to customize, debug, or fix potential problems that may be caused by them.

We switched from OpenSource to ClosedSource years ago as we are developing the most feature rich Domain Registrar Modules for WHMCS on the market. Therefore, we often enough noticed that our direct competitors had an eye on our code base to identify how we cover things. We are no longer open sharing such insights and even though I fully agree that it would make it easier to debug things, patching and extending the module is still our scope. If our customers would start patching issues or applying custom changes on their own, it would make upgrades harder or even impossible (and if the patches are yet not officially included, it continues with them). Over years, we are extending our entire software bundle on customer demand which worked perfectly fine. Also, we are experienced regarding WHMCS Customer Support and identifying issues side-by-side with our customers. I guess, that makes it clear that we won't go back to OpenSource for valid reasons. Most WHMCS Modules are encrypted anyway, but you have to pay for them while our bundle is for free!

modules/registrars/cnic/hooks.php breaks configuratessl.php for other modules

Let me see, if I can find something out. But again, as you didn't provide useful details, probably hard to identify the root cause based on that.

cenourinha commented 4 days ago

I can't recall what version we were using previously. Now we're using "24.5.0". The problem occured when we tried to generate a CSR via the WHMCS Client Area.

We would get the error message "Error! An error occurred": https://i.imgur.com/yWGKxGW.png

Looking at the browsers console, we could see that the json was apparently correct in the response, but the status of the response would be a "500" error status: https://i.imgur.com/ld5IHas.png https://i.imgur.com/Hen0fmL.png

We spent hours debugging, trying to figure if this was some Apache or Mod_Security rules that was being triggered, because we could find any additional debug information.

After checking the logs to determine when this started to happen, we figured out that it started after we update CNIC modules. We then removed/renamed the CNIC modules and ended by identifying that this was related with the hooks.php file.

KaiSchwarz-cnic commented 4 days ago

ok, let me again come back to the platform details:

cenourinha commented 4 days ago
KaiSchwarz-cnic commented 4 days ago

Thanks, PHP 7.4 could play a role (long story). Is it possible for you to upgrade to PHP 8.1 and to test again? Or are you blocked by another party in PHP 7.4? PHP 7 reached EOL a while ago and we are short before deprecating it as well.

PHP 7.2, 7.3, 7.4, or 8.1 (WHMCS 8.0 through 8.10), so not possible for you without upgrading WHMCS as I see. https://docs.whmcs.com/getting-started/system-requirements/

KaiSchwarz-cnic commented 3 days ago

https://github.com/centralnicgroup-opensource/rtldev-middleware-whmcs/releases/tag/v24.5.3

Does that help?