WHM 62 (Build 19 / 20) / Listpkg API Bug

Fr3DBr

Member
Apr 6, 2013
21
1
3
The Netherlands
cPanel Access Level
DataCenter Provider
Twitter
Hi, guys.

Over 3 years, we've been using reseller account to provision customer accounts in cPanel. Although until Version 62 / Build 17, listpkgs was working properly, returning all the selected/defined packages.

Although, for some reason we aren't aware of, since Build 19 and 20, listpkgs isn't working anymore resulting in access denied for WHMCS.

When you set the reseller with "root privileges", listpkgs work fine showing all the packages.

I've tried deleting/recreating all the packages, it works fine in WHM, I can upgrade/downgrade packages and so on, but in listpkgs the result is always the same, access denied.

What can we do to have this fixed, as I don't want to give root privileges to the reseller accounts ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello @Fr3DBr,

I'm currently unable to reproduce the issue you have reported. Could you verify which specific steps you are taking to reproduce the issue, and the privileges you have assigned to the reseller account?

Thank you.
 

Fr3DBr

Member
Apr 6, 2013
21
1
3
The Netherlands
cPanel Access Level
DataCenter Provider
Twitter
Hi, Michael.

1) Make a new order in WHMCS w/ a Web Hosting Service.
2) Go to Product Details change the product with package A (the one which was ordered) to package B (the one you will upgrade to).
3) Press "Change Package" and wait.
4) You'll get the following error message:

Code:
Module Command Error
Product attribute Package Name "PACK_2" not found on server
When checking module logs, we can get the following informations (screenshot attached).

Basically, listpkgs API returns access denied. But what is curious is, it only happens with "Change Package", if you go to the "product setup" and check the "package list" you can see all them, because everything is returned properly. As you can see in Image 2, also attached.

It's the same server, with same reseller account and same privileges as you can see.
 

Attachments

Fr3DBr

Member
Apr 6, 2013
21
1
3
The Netherlands
cPanel Access Level
DataCenter Provider
Twitter

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello,

Could you access WHM as the reseller, and append the browser URL to the "listpkgs" WHM API 1 function to see the output? EX:

Code:
https://hostname.example.com:2087/cpsess##########/json-api/listpkgs?api.version=1
Does this produce a list of the available packages, or do you see the error message?

Thank you.
 
  • Like
Reactions: Fr3DBr

Fr3DBr

Member
Apr 6, 2013
21
1
3
The Netherlands
cPanel Access Level
DataCenter Provider
Twitter
Hello,

Could you access WHM as the reseller, and append the browser URL to the "listpkgs" WHM API 1 function to see the output? EX:

Code:
https://hostname.example.com:2087/cpsess##########/json-api/listpkgs?api.version=1
Does this produce a list of the available packages, or do you see the error message?

Thank you.
Hi, Michael.

I've logged as the reseller and tried your link, this is what is returned:

{"data":{"pkg":[]},"metadata":{"command":"listpkgs","version":1,"reason":"OK","result":1}}

(No package list) But the reseller account has the option to "allow usage of global packages" enabled.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
I've logged as the reseller and tried your link, this is what is returned:

{"data":{"pkg":[]},"metadata":{"command":"listpkgs","version":1,"reason":"OK","result":1}}

(No package list) But the reseller account has the option to "allow usage of global packages" enabled.
Could you open a support ticket using the link in my signature so we can take a closer look and determine why the available packages aren't listed on the affected system? You can post the ticket number here and we will update this thread with the outcome.

Thank you.
 

Fr3DBr

Member
Apr 6, 2013
21
1
3
The Netherlands
cPanel Access Level
DataCenter Provider
Twitter
Could you open a support ticket using the link in my signature so we can take a closer look and determine why the available packages aren't listed on the affected system? You can post the ticket number here and we will update this thread with the outcome.

Thank you.
Sure, btw seems this link has some issue with CSS right now, as things are showing a bit messed up.

It's done, ticket ID: 8363987

Thanks.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello,

To update, it looks like a new WHMCS support ticket was opened to report this issue. Feel free to update this thread with the outcome once you hear back.

Thanks!
 

Fr3DBr

Member
Apr 6, 2013
21
1
3
The Netherlands
cPanel Access Level
DataCenter Provider
Twitter
Hello,

To update, it looks like a new WHMCS support ticket was opened to report this issue. Feel free to update this thread with the outcome once you hear back.

Thanks!
Hi, Michael.

Yes, by discussing with the support department, this is related to a change WHMCS might do in order to work in this scenario.
 
  • Like
Reactions: cPanelMichael