-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password plugin, cPanel driver #5252
Conversation
Add support for cPanel remote access hash (choice between hash auth and plain password auth).
Add support for cPanel hash auth, using a Remote Access Key (choice between hash auth and plain password auth).
Add support for hash auth (cPanel Remote Access Key) and call the $xmlapi->listaccts() method to retrieve the cPanel account user that owns the domain (required for cPanel reseller accounts).
Could you keep our code style and indentation, please? |
Changed code style and indentation.
Sure. I've fixed it in commit 8042955 |
} | ||
// Pass auth | ||
else if (!empty($rcmail->config->get('password_cpanel_password'))) { | ||
$this->xmlapi->hash_auth( $this->cuser, $rcmail->config->get('password_cpanel_password')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here password_hash() should be used. Also, I'd like to see config->get() use once per option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified the code to call config->get() only once. Commit is here:
7ed0d33
The hash key here is a unique remote access key that's generated and stored in the WHM user's account. For example, for the root user, it would be stored in /root/.accesshash. I don't think it can be generated outside of the WHM interface.
https://documentation.cpanel.net/display/ALD/Remote+Access+Key
Call $rcmail->config->get() only once per option by assigning variable inside the IF statement.
Add support for hash auth (cPanel Remote Access Key) in the Password plugin's cPanel driver and call the $xmlapi->listaccts() method to retrieve the cPanel account user that owns the domain (required for cPanel reseller accounts).