Skip to content
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

Merged
merged 6 commits into from
Oct 1, 2016
Merged

Password plugin, cPanel driver #5252

merged 6 commits into from
Oct 1, 2016

Conversation

julianmatz
Copy link
Contributor

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).

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).
@alecpl
Copy link
Member

alecpl commented May 14, 2016

Could you keep our code style and indentation, please?

Changed code style and indentation.
@julianmatz
Copy link
Contributor Author

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'));
Copy link
Member

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.

Copy link
Contributor Author

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.
@alecpl alecpl merged commit 7ed0d33 into roundcube:master Oct 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants