cPanel API get_password_strength
I had the Cpanel API get_password_strength function working previously, but today when I test it was only returning a strength of 31 for the test password *fox&jn3)G>L, then I found the strength remained at 31 even if I added more characters.
Then in a separate test script I'm getting the following error: "Failed to read valid json data in json fast mode". I'm wondering if I've made too many requests with the test script?
I've now tried setting the ftp password to *fox&jn3)G>L$T7j\"B9 using the API function Ftp::passwd and it failed with a 'too weak' error. This was working ok last week.
I found the ftp account had not been created so maybe that's why the password would not reset, but if so then it was returning spurious errors.
I've now recreated the ftp account and get_password_strength is now working correctly again.
-
Hi @nickwuk Can you show me the full query string you were using (without any personal domain/account information) so that I can try testing this locally? Thanks! 0 -
Hi @nickwuk Can you test this after you've recently restarted queuprocd? It may be the task queue has a backlog as well which could also be due to high load. Thanks! 0 -
I've started retesting the addftp function (more than 3 months later) and now when it fails the code is outputting the result. In the example below the creation failed but succeeded using the same password when created manually. I notice the event result is 1 but the data result is 0 without reason, although the reason is given in the 'error' key. [cpanelresult] => Array ( [apiversion] => 2 [error] => This system does not allow the given password for "" because it is too weak and would be too easy to crack. Please select a password with strength rating of 90 or higher. [event] => Array ( [result] => 1 ) [module] => Ftp [func] => addftp [data] => Array ( [0] => Array ( [result] => 0 [reason] => ) ) )
The user and password option parameters used were: user: sitepro pass: 3$#J^$ownGur When an ftp account was created manually using the same parameters then it worked.0
Please sign in to leave a comment.
Comments
5 comments