Roundcube Community Forum

 

RC plugin autologin from CMS or Portal ...

Started by lacri, June 16, 2009, 03:58:45 AM

Previous topic - Next topic

lacri

I have realisized based on the autologon sample plugin an plugin thats make login from a portal or other external site or cms into roundcube possible.

i attached the plugin with a little guide inside.

Tested with current SVN 2646

Change
attachment replace with new version for little bit more security
the pass is no more submittet as plaintext


mst3kroqs

Shouldn't:

    // decode pass, revert and replace key
   $_POST['_pass'] = str_replace('*yourkey*','',base64_decode(strrev(get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'))));


be:

    // decode pass, revert and replace key
   $args['_pass'] = str_replace('*yourkey*','',base64_decode(strrev(get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'))));


??

CarlB

Very nice!

Is there any way to use this to open a new message with the to: pre filled?

Thank you.

komunikasys

Could someone tell me how to remove logout button once the user login from other cms, and instead of using logout button on roundcube, i would like to use logout button from my cms. So what script do i have to add on my logout acction?

Best regards

Raymond Victorio

flattery

One quick and dirty way to do it is to edit the skin file.
/skins/default/includes/taskbar.html


Quote from: komunikasys;24205Could someone tell me how to remove logout button once the user login from other cms, and instead of using logout button on roundcube, i would like to use logout button from my cms. So what script do i have to add on my logout acction?

Best regards

Raymond Victorio

cftt

don't seem to work en 0.4 beta!

Any workaround?

TTrek


loproc

Quote from: cftt;27283don't seem to work en 0.4 beta!

Any workaround?

Yup, in the following:
    // change action to login
    
if ($args['task'] == 'mail' && empty($args['action']) && empty($_SESSION['user_id']) && !empty($autologin)) {
      
$args['action'] = 'login';


change "mail" to "login" so you have the following:
    // change action to login
    
if ($args['task'] == 'login' && empty($args['action']) && empty($_SESSION['user_id']) && !empty($autologin)) {
      
$args['action'] = 'login';

darkfly

I have instaled the autologin plugin for test,and i can't put it working!

I go to the roundcube login page but with error "bad username or password".

I know the value are working, because in the login form, the email address is good, so i think is a password problem.

I use this code:

$userpassword = "testpassword";

$_SESSION['userpassword'] = strrev(base64_encode('ot-%IrA3e+=3$Oug7yheBi%k'.$userpassword));

echo 'http://mydomain.com/Webmail/?_task=mail" method="post" target="roundcube">






';


in autologin.php i have:
// decode pass, revert and replace key
         $_POST['_pass'] = str_replace('ot-%IrA3e+=3$Oug7yheBi%k','',base64_decode(strrev(get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'))));


i have the same key in the 2files.

i have try with:
ssl://mydomain.com:143" />
same problem


What s wrong? any idea? Thanks

stewx

Has anyone actually gotten this plugin to work?  I've been trying in vain for a day or so...

timtraver

Quote from: stewx;30727Has anyone actually gotten this plugin to work?  I've been trying in vain for a day or so...

yes, it works like it says it does. what is the problem that you are having?

The real thing that I am running into is if you don't logout of the webmail client, and you try and do the autologin from the CMS to another account, the session isn't killed and it goes to the previous account.

Anyone know how to kill the session before it tries to do the autologin? I've tried a bunch of ways of killing the session cookie, and killing the session in the autologin code, but to no avail...

Tim

mikelsoft

#12
using 0.5 beta

i still fail to use the plugin

here are my config

if ($args['task'] == 'login' && empty($args['action']) && empty($_SESSION['user_id']) && !empty($autologin)) {
      $args['action'] = 'login';

      // decode pass, revert and replace key
                  $args['_pass'] = str_replace('mykey','',base64_decode(strrev(get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'))));

the form
$password='pa33word';

$_SESSION['userpassword'] = strrev(base64_encode('mykey'.$password));


echo '







Submit
';

give me login error help please anyone

CarlB


Muaythaitv

Quote from: CarlB;32867Is it possible to use this with 0.5 ?
Look here : autologon.php in trunk/plugins/autologon ? Roundcube Webmail

At minimum it miss
$args['cookiecheck'] = false;
$args['valid'] = true;

in function authenticate