I am Still facing problem.. Your session is in valid or expired..
My autologon script is as under
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?
$_POST['password'] = 'test@123';
$_SESSION['userpassword'] = strrev(base64_encode('1234'.$_POST
['password']));
?>
<form name="roundcubelogin" action="
http://ns2.ctns.info/rcube/?_task=mail" method="post" target="rcube">
<input type="hidden" name="_timezone" value="_default_" />
<input type="hidden" name="_task" value="mail" />
<input type="hidden" name="_autologin" value="1" />
<input type="text" name="_user" value="test@test.com" />
<input type="password" name="_pass" value="<?echo $_SESSION['userpassword']?>" />
<input type="submit" name="submit" value="SUBMIT" />
</form>
</body>
</html>
user ID and passwordd changed..
My Autologin.php Plugin is as follows
<?php
/**
* This plugin performs an automatic login if accessed
* with post Data from other Site an Portal or CMS
* Based on sample autologon PlugIn
*
* @version 0.2
* @author Eric Appelt (lacri)
*
* show into README to install and config
*
* changes
* 0.2 make a little bit secure with base64_encode strrev
* and a key thats replace after submitting encoded pass data
*
*/
class autologin extends rcube_plugin
{
function init()
{
$this->add_hook('startup', array($this, 'startup'));
$this->add_hook('authenticate', array($this, 'authenticate'));
}
function startup($args)
{
$rcmail = rcmail::get_instance();
$autologin = get_input_value('_autologin', RCUBE_INPUT_POST);
// change action to login
if ($args['task'] == 'mail' && empty($args['action']) && empty($_SESSION['user_id']) && !empty($autologin)) {
$args['action'] = 'login';
// decode pass, revert and replace key
$_POST['_pass'] = str_replace('1234','',base64_decode(strrev(get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'))));
// set initial cookie without this cookie login is not possible
$_COOKIE['roundcube_sessid'] = session_id();
}
return $args;
}
function authenticate($args)
{
$autologin = get_input_value('_autologin', RCUBE_INPUT_POST);
if (!empty($autologin)) {
$args['user'] = get_input_value('_user', RCUBE_INPUT_POST);
$args['pass'] = get_input_value('_pass', RCUBE_INPUT_POST);
$args['host'] = 'localhost';
$args['cookiecheck'] = false;
$args['valid'] = true;
}
die('<pre>'. print_r($args, true));
return $args;
}
}
Hope someone can really help... I need this working desperately.. I am using Windows Platform with Hmailserver and roundcube..
This is what i get in my session logs
[07-Jul-2012 04:16:35 +0530]: Aborted session nuuu14r3a0on62njgns8g356g1; no valid session data found
Regards