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.

Access to password strength algorithm

Discussion in 'cPanel Developers' started by mjqtreble, Jun 23, 2010.

  1. mjqtreble

    mjqtreble Registered

    Joined:
    Jun 23, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Does anybody know of a way to access the cpanel password strength algorithm? - or know what the algorithm is?

    I am building an interface to create email accounts using the api. My problem is that the minimum strength on the server is set to 50% - My hosting company will not lower this for security reasons. When I create an account using the api it fails if the strength is too low, so I would like to pre-check the strength before submission just like on the cpanel interface.

    It would be really good if there was an api call for this, then it could be done using an ajax call, but it doesn't seem to be available.

    Thanks.
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Friendly moderator note

    I moved this post to the Developer Discussions section, since it is appropriate as a development-related question.
     
  3. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi mjqtreble,

    I think you're looking for:
    Code:
    https://$server:2083/backend/passwordstrength.cgi?password=At3stPas_w0rd
    
    you'll need to be authenticated, naturally. By sending the 'password' parameter, you'll get a JSON response like:
    Code:
     { "strength": 100 } 
    
    Regards,
    -David
     
  4. mjqtreble

    mjqtreble Registered

    Joined:
    Jun 23, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks - works a treat!

    It would be good to add this call to the documentation.
     
Loading...

Share This Page