Author Topic: Password Plugin - Showing success but PW doesn't stick  (Read 6164 times)

Offline redoakweb

  • Newbie
  • *
  • Posts: 6
Password Plugin - Showing success but PW doesn't stick
« on: October 23, 2013, 07:50:53 PM »
Hello,

After searching through every forum on the internet regarding this issue, I am writing my own post.  I have been trying to set up the password plugin on my roundcube installation on bluehost.  I have a VPS, and access to the server.  I have activated the plugin and entered the settings into the password config.  The plugin shows up, and I can enter a new password and get a "successfully saved" message.  However if I log out and log back in, it doesn't recognize the new password, and I have to enter the old one.

Strange thing is, if I change the password inside roundcube, without logging out, I can then change the password again entering my new password in the "old password" field, and it is consistent.  Meaning within the session, it is remembering the password change.  But somehow it doesn't carry over after logout.

Can any help me?  Below are my settings:

main.inc.php
Code: [Select]
// List of active plugins (in plugins/ directory)
$rcmail_config['plugins'] = array('cpanellogin','cpanellogout','password');

config.inc.php
Code: [Select]
$rcmail_config['password_driver'] = 'cpanel';
Code: [Select]
// cPanel Driver options
// --------------------------
// The cPanel Host name
$rcmail_config['password_cpanel_host'] = 'myprimarydomain.com';

// The cPanel admin username
$rcmail_config['password_cpanel_username'] = 'username';

// The cPanel admin password
$rcmail_config['password_cpanel_password'] = 'XXXXXXXX';

// The cPanel port to use
$rcmail_config['password_cpanel_port'] = 2096;

// Using ssl for cPanel connections?
$rcmail_config['password_cpanel_ssl'] = true;

// The cPanel theme in use
$rcmail_config['password_cpanel_theme'] = 'bluehost';

Any input is appreciated

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #1 on: October 25, 2013, 02:57:13 AM »
In the file <RC root>/plugins/password/drivers/cpanel.php find the following:
Code: [Select]
$response = $this->HTTP->getData('mail/dopasswdpop.html', $data);
Add add after it:
Code: [Select]
die($response);
Then change the password and post what it returns.

Offline redoakweb

  • Newbie
  • *
  • Posts: 6
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #2 on: October 25, 2013, 03:20:46 AM »
Ok, added the line
Code: [Select]
die($response);

And got this in my browser window on password change:

Code: [Select]
HTTP/1.1 200 OK Server: cpsrvd/11.38.2.11 Connection: close Date: Fri, 25 Oct 2013 07:19:53 GMT Last-Modified: Fri, 28 Jun 2013 19:25:59 GMT Content-type: text/html; charset="utf-8" Content-length: 2280 Connection: close
« Last Edit: October 25, 2013, 03:31:49 AM by redoakweb »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #3 on: October 25, 2013, 03:40:26 AM »
Oops, I posted the old debug instructions. Do the following:

In the file <RC root>/plugins/password/drivers/cpanel.php find the following:
Code: [Select]
$response = $this->HTTP->getData('mail/dopasswdpop.html', $data);
Add the following line after it:
Code: [Select]
write_log('password', 'Response:'. $response);
Then post the entry from the password login in the <RC root>/logs/password error log.

Offline redoakweb

  • Newbie
  • *
  • Posts: 6
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #4 on: October 25, 2013, 03:55:43 AM »
Ok, this is from the password log:

Code: [Select]
[25-Oct-2013 07:53:06 +0000]: Response:HTTP/1.1 200 OK
Server: cpsrvd/11.38.2.11
Connection: close
Date: Fri, 25 Oct 2013 07:53:06 GMT
Last-Modified: Fri, 28 Jun 2013 19:25:59 GMT
Content-type: text/html; charset="utf-8"
Content-length: 2280
Connection: close

<cpanel setvar="headerimg=../images/mailmenu.gif">
<cpanel setvar="dprefix=../">
<cpanel Branding="include(stdheader.html)">
<style type="text/css">
<?cp Branding::spritelist(.spriteicon_img_mini {float:left;margin-right:5px;background: url\{leftparenthesis}"%"\{rightparenthesis};} %,@spriteurl,images::#icon-${img}_mini {background-position\{colon}0 -${cssposition}px;width\{colon}${width}px;height\{colon}${height}px; }:) imgtype=icon,subtype=img,method=scale_60percent,format=png,img=manageaccounts ?>
</style>
<div class="body-content">

<div class="h1Title"><div class="spriteicon_img_mini" id="icon-manageaccounts_mini"></div> <cpanel langprint="MENUMailChange"></div>

<cpanelif !$appname==webmail || $FORM{'email'}@$FORM{'domain'}==$authuser>
<cpanel setvar="auth_ok=1">
</cpanelif>

<cpanelif $appname==webmail && !$FORM{'email'}@$FORM{'domain'}==$authuser>
<div class="error_details"><cptext 'You are not allowed to change the password for the user “[output,class,_1,status]”.',"$FORM{'email'}@$FORM{'domain'}"></div></p>
</cpanelif>


<cpanelif $CPVAR{'auth_ok'}>
<!--<cpanel Email="passwdpop($RAW_FORM{'email'},$RAW_FORM{'password'},$RAW_FORM{'quota'},$RAW_FORM{'domain'})">-->
</cpanelif>

    <cpanelif !$CPERROR{'email'} && $CPVAR{'auth_ok'}>
<p>
<cptext 'The email account “[output,class,_1,status]” was successfully [boolean,_2,created,modified,removed].',"$FORM{'email'}@$FORM{'domain'}",0>
</p>
        </cpanelif>
    <cpanelif $CPERROR{'email'} && $CPVAR{'auth_ok'}>
    <p class="errors"><cpanel langprint="CPError"> <cpanel langprint="PassError">
    <a href="#" onclick="document.getElementById('details').style.display='block'; return false;"><cpanel langprint="AODShowDetails"></a> </p>
   
<div class="details" id="details">
<cpanel print="$CPERROR{'email'}">
</div>
<noscript>
<div class="details-noscript" id="details">
<cpanel print="$CPERROR{'email'}">
</div>
</noscript>
        </cpanelif>


<cpanelif $appname==webmail>
<div class="return-link"><a href="../index.html">&larr; <cptext "Go Back"></a></div>
</cpanelif>

<cpanelif !$appname==webmail>
<div class="return-link"><a href="pops_noscript.html">&larr; <cptext "Go Back"></a></div>
</cpanelif>

</div>
<cpanel Branding="include(stdfooter.html)">

[25-Oct-2013 07:53:06 +0000]: Password changed for user info@paloaltopsychologygroup.com (ID: 1) from 67.188.33.56

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #5 on: October 25, 2013, 10:42:14 AM »
The response is completely invalid, its returning template code not an actual response. There is some sort of problem with cPanel on the server.

Offline redoakweb

  • Newbie
  • *
  • Posts: 6
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #6 on: October 25, 2013, 12:36:56 PM »
Isn't it more likely that there is an issue with the cpanel driver file?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #7 on: October 25, 2013, 12:40:10 PM »
Typically yes, but this is what a response should look like:
Code: [Select]
<p class="errors">There was a problem changing the password.
    <a href="#" onclick="document.getElementById('details').style.display='block'; return false;">Show Details</a> </p>
   
<div class="details" id="details">
Sorry, the password you selected cannot be used because it is too weak and would be too easy to crack.  Please select a password with strength rating of 50 or higher.
</div>
<noscript>
<div class="details-noscript" id="details">
Sorry, the password you selected cannot be used because it is too weak and would be too easy to crack.  Please select a password with strength rating of 50 or higher.
</div>
</noscript>

But the code you posted is the raw template file, notice all of the <cpanelif> tags and cpanel include tags <cpanel Branding="include(stdfooter.html)"> that all should be done by the server before a response is sent.

Offline redoakweb

  • Newbie
  • *
  • Posts: 6
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #8 on: October 25, 2013, 12:43:43 PM »
Ok... So what are the next steps to take to resolve this issue?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #9 on: October 25, 2013, 01:40:43 PM »
I'm not sure since its a cPanel problem. The only other option would be to use the RoundCube development version which has a different cPanel driver.

Offline redoakweb

  • Newbie
  • *
  • Posts: 6
Re: Password Plugin - Showing success but PW doesn't stick
« Reply #10 on: October 25, 2013, 02:20:41 PM »
Ok, thanks for your help.  Looks like I will have to find a different webmail solution.