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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

UAPI userdata mismatching "ssl" field between users

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

Tags:
  1. Plamen Kalchev

    Plamen Kalchev Registered

    Joined:
    Jul 4, 2017
    Messages:
    2
    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:
    38,658
    Likes Received:
    1,419
    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.
     
  3. Plamen Kalchev

    Plamen Kalchev Registered

    Joined:
    Jul 4, 2017
    Messages:
    2
    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:
    38,658
    Likes Received:
    1,419
    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.
     
Loading...

Share This Page