Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

UAPI userdata mismatching "ssl" field between users

Discussion in 'cPanel Developers' started by Plamen Kalchev, Jul 16, 2017.

Tags:
  1. Plamen Kalchev

    Joined:
    Jul 4, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Sofia, Bulgaria
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm noticing strange behavior when using UAPI's DomainInfo single_domain_data - when using the json I'm getting field "ssl": 1 (int) for some users and "ssl":"1" (string) for other users. Why is this happening and how can I fix this? Anyone had similar problems?
     
    anowar likes this.
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,699
    Likes Received:
    1,790
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you post the full output that you see, ensuring to replace any identifying information with examples? Also, could you confirm what steps you are taking to reproduce the issue?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Plamen Kalchev

    Joined:
    Jul 4, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Sofia, Bulgaria
    cPanel Access Level:
    Root Administrator
    Hello, sorry for my delayed response. Here is what I mean:

    p.kalchev@server:/home/:~# uapi --user=user1 DomainInfo single_domain_data domain=domain1.com_SSL --output=json | jq .result.data.ssl
    "1"
    p.kalchev@server:/home/:~# uapi --user=user2 DomainInfo single_domain_data domain=domain2.com_SSL --output=json | jq .result.data.ssl
    1
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,699
    Likes Received:
    1,790
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you reproduce this when using the "uapi --user=user1 DomainInfo single_domain_data domain=domain1.com_SSL --output=json" command on in it's own, before it's output to ".result.data.ssl"?

    Also, per the documentation, this UAPI function only supports the domain name itself, as opposed to "domain1.com_SSL". If you'd like to see if the SSL certificate is installed, you may find one of these UAPI functions more helpful:

    UAPI Functions - SSL::installed_host - Software Development Kit - cPanel Documentation
    UAPI Functions - SSL::installed_hosts - Software Development Kit - cPanel Documentation

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice