Author Topic: Roudcube 1.0 fails on first login, worked in release of 0.9.4.  (Read 5640 times)

Offline ernied

  • Newbie
  • *
  • Posts: 8
Our site has a login page with its own fields for username and password, which is then passed directly into Roundcube with HTML like this:

Code: [Select]
<br><br><form action="https://webmail.lightspeed.ca/roundcube/" method="post" id="generic_form" style="padding:10px" target="_blank">
<!--//Roundcube-->
<input type="hidden" name="_task" value="login">
<input type="hidden" name="_action" value="login">
<input type="hidden" name="_timezone" id="rcmlogintz" value="_default_">
<input type="hidden" name="_url" id="rcmloginurl">

However, when a customer tries to log in from our page, the get the pink popup error message "Invalid request! No data was saved." After this error, they are able to log in the second time around.

The Roundcube error log shows this line, and I get no errors from Apache:

[21-Apr-2014 15:54:12 -0700]: PHP Error: Deprecated hook name. outgoing_message_headers -> message_outgoing_headers in /home/webmail.lightspeed.ca/public_html/roundcube/program/lib/Roundcube/rcube_plugin_api.php on line 359 (POST /roundcube/?_task=login&_action=login)


The only thing that changed was to upgrade to v1.0.0 from 0.9.4 using the recommended upgrade script.
« Last Edit: April 21, 2014, 06:56:07 PM by ernied »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Roudcube 1.0 fails on first login, worked in release of 0.9.4.
« Reply #1 on: April 21, 2014, 07:18:33 PM »
Roundcube requires a plugin to be able to login from a remote page so check your plugins and make sure there working correctly.

Offline ernied

  • Newbie
  • *
  • Posts: 8
Re: Roudcube 1.0 fails on first login, worked in release of 0.9.4.
« Reply #2 on: April 22, 2014, 03:52:31 PM »
Well, I am using the http_authentication plugin, but evidently, it doesn't work. :)

What kind of testing can I do on it anyway?

Offline ernied

  • Newbie
  • *
  • Posts: 8
Re: Roudcube 1.0 fails on first login, worked in release of 0.9.4.
« Reply #3 on: April 22, 2014, 04:09:17 PM »
I've removed the log_sender plugin, which was causing that error in the logs, but logging in from that first page still gives me the same result.

These are the plugins we have currently installed:

$config['plugins'] = array('http_authentication','squirrelmail_usercopy', 'userinfo', 'new_user_dialog',  'rcs_mobile_switch', 'rcs_mobile_options', 'filters');

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Roudcube 1.0 fails on first login, worked in release of 0.9.4.
« Reply #4 on: April 24, 2014, 05:22:10 AM »
You'd need to have a modified version of the autologin plugin in order for that form to work.

Offline ernied

  • Newbie
  • *
  • Posts: 8
Re: Roudcube 1.0 fails on first login, worked in release of 0.9.4.
« Reply #5 on: April 24, 2014, 11:53:49 AM »
Yeah, I bet I'd have to modify it so it will work with any version of Roundcube newer than 0.3.

Also, if I needed that plugin, why did it work without it for version 0.9.4?

Offline ernied

  • Newbie
  • *
  • Posts: 8
Re: Roudcube 1.0 fails on first login, worked in release of 0.9.4.
« Reply #6 on: April 24, 2014, 01:28:06 PM »
I've tried installing the autologin plugin, but I'm still getting the same results. I've also set up an experimental HTML file to handle the logins, the more complete HTML looks like this:

Code: [Select]
<br><br><form action="https://webmail.lightspeed.ca/roundcube/" method="post" id="generic_form" style="padding:10px" target="_blank">
<!--//Roundcube-->
<input type="hidden" name="_task" value="mail">
<input type="hidden" name="_action" value="login">
<input type="hidden" name="_autologin" value="1">
<input type="hidden" name="_timezone" value="_default_">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<p align="left">
<label><input size="25" type="text" id="generic_user" name="_user" value="" />&nbsp;&nbsp;Username</label>
<br>
<label><input size="25" type="password" id="generic_pass" name="_pass" value="" />&nbsp;&nbsp;Password</label>

I also turned on session logging, and now the only logs I'm getting from Roundcube when these logins fail looks like this:

[24-Apr-2014 10:21:05 -0700]: Aborted session avo87v7kd5egcdjp0qsfdaq4k7; no valid session data found

I hope this provides some clue about what's going on.

Offline ernied

  • Newbie
  • *
  • Posts: 8
Re: Roudcube 1.0 fails on first login, worked in release of 0.9.4.
« Reply #7 on: April 28, 2014, 01:20:44 PM »
Bump!

I still haven't found any resolution to this problem. It might be worth noting we're using Debian 7.4 Stable, Apache 2.2.22 (Debian) and PHP 5.4.4-14+deb7u8, so maybe the issue lies there?