Author Topic: automatically authenticating with 1.0  (Read 2749 times)

Offline jwartnic

  • Jr. Member
  • **
  • Posts: 14
automatically authenticating with 1.0
« on: May 07, 2014, 02:14:50 PM »
Hello,

I'm sure this may be a repost as I see a handful of ideas on Google for this. The responses seem to be from older versions though, and don't apply/work (at least I couldn't get them too). My question is: I have a website and I want to pass the credentials to the login page via POST. The username seems to get through (as it appears in the username field), but either the password is not getting passed or is passed incorrectly as I get a 'nothing was changed' message and the login page is displayed. If I type in the password that I passed, it logs in fine.

Any help appreciated.

Jim

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: automatically authenticating with 1.0
« Reply #1 on: May 07, 2014, 05:33:57 PM »
You need to have a plugin grab the post details take a look at the autologin plugin for example.

Offline jwartnic

  • Jr. Member
  • **
  • Posts: 14
Re: automatically authenticating with 1.0
« Reply #2 on: May 07, 2014, 07:25:05 PM »
So I looked at the install and the autologon plugin was already there. When I looked for the config you mentioned, it was not there. Here is what I have in the config directory:

config.inc.php  db.inc.php.dist  db.old.php  defaults.inc.php  main.inc.php.dist  main.old.php  mimetypes.php


I changed the config.inc.php and main.inc.php.dist files to include this plugin with no avail. Still getting an error when I try to post.

Here is the simple form:

 <FORM name="form"  action="https://website/index.php?_autologin=login" method="post" name="login">
                 <input type="hidden" name="_url" id="rcmloginurl" value="">
                  <input type=hidden   name="_action" value="login">
                  <input type="hidden" name="_timezone" id="rcmlogintz" value="_default_">
<INPUT id="_user" maxLength=50 size=17 name="_user"><input type="hidden" name="_token" value="7222a496e9d979a15bea305e06045dd0"><input type=hidden name="_action" value="login">
<INPUT type=password maxLength=40 size=17 id="_pass" name="_pass">
<INPUT type=submit value="Login" name=.save>
</FORM>

When I enter the user and password and click submit, I get a cert error (which is typical) and then it brings me back to the logon page stating Invalid Request! No data was saved.

Not sure what I'm missing here. Again, this is 1.0 of roundcube. Your help is greatly appreciated.

Thanks in advance.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: automatically authenticating with 1.0
« Reply #3 on: May 08, 2014, 12:58:57 PM »
The autologon plugin is only an example, it needs to be modified to work with a form on a website.