Hi guys,
I realise this probably isnt directly a CWP interface bug, however, i dont know where else to put it so that someone fixes the issue.
In the WMCS module the following code contains an error...
Two problemsProblem 1. The WHMCS module php code AdminLink URL is incorrect and returns a 404 error for the admin page
function cwp7_AdminLink($params) {
$code = '<form action="https://'.$params["serverhostname"].':2031/login.php" method="post" target="_blank">
<input type="hidden" name="user" value="'.$params["serverusername"].'" />
<input type="hidden" name="password" value="'.$params["serverpassword"].'" />
<input type="submit" value="Login to Control Panel" />
</form>';
running this from inside WHMCS produces a 404 error because the URL /login.php doesnt exist. Below is an image of the area in WHMCS where this action is performed and the inspect element alongside...
https://drive.google.com/open?id=1JBXZcQjyxgEEpr_uQHad3jZsKX6uagDFWhen i manually go to the login page of CWP, the URL is https://..../login/index.php
So, unless there is a better fix for this, the solution for now is to use the following corrected code...
function cwp7_AdminLink($params) {
$code = '<form action="https://'.$params["serverhostname"].':2031/login/index.php" method="post" target="_blank">
<input type="hidden" name="user" value="'.$params["serverusername"].'" />
<input type="hidden" name="password" value="'.$params["serverpassword"].'" />
<input type="submit" value="Login to Control Panel" />
</form>';
Which takes the admin user to the CWP login screen.
Problem 2The module copies root user name and password into the web browser which is visible in the inspect element in google chrome (personally i think that is a bad idea there is no reason for this to be passed across to the browser from WHMCS). However, with the incorrect URL issue above, this is not working anyway...so it should be removed from the php code in the module! (which i have not done yet, but i will on my version)