Author Topic: Minimal Login Page  (Read 4501 times)

Offline AngelDeLaNoche

  • Newbie
  • *
  • Posts: 4
Minimal Login Page
« on: July 25, 2011, 05:47:27 PM »
We have a web site that is loaded from multiple domain names.  I am trying to create a minimal login page that is loaded in an iframe on the main page.  The iframe passes the domain name to the login page in the frame.  The login page then adds the domain to the users account when they login.  My small login page submits the data to the roundcube login.  As far as I can tell, the data is being passed correctly, but I get an error on the roundcube login page, "Invalid request! No data was saved."

From the index page:

$DomainName = $_SERVER['HTTP_HOST'];
echo "";
?>

smalllogin.php:

$DomainName = $_GET["domain"];
?>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">















         













Use classic interface.";?>




Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Minimal Login Page
« Reply #1 on: July 25, 2011, 09:23:02 PM »
You'll need to implement a login plugin in RoundCube to login, take a look at autologon.php in trunk/plugins/autologon as an example.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Minimal Login Page
« Reply #2 on: July 26, 2011, 12:19:40 AM »
To clarify: Roundcube has a built in CSFR prevention. Each page gets a unique token which is cross checked when submitting a form or triggering an AJAX-Request. If the token does not match the 'Invalid request ...' error is raised. To around this you have to disable CSFR prevention. As skaero stated the autologon plugin is a good starting point.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline AngelDeLaNoche

  • Newbie
  • *
  • Posts: 4
Minimal Login Page
« Reply #3 on: August 05, 2011, 05:29:14 PM »
Turns out we have that plugin on the server already, but don't know what to do with it.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Minimal Login Page
« Reply #4 on: August 06, 2011, 04:32:35 AM »
autologon plugin is a framework (proof of concept) for your own coding.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)