[imp] accessing from a URL not a form
Dean Guenther
guenther@wsu.edu
Thu, 5 Sep 2002 08:51:33 -0700 (PDT)
Thanks Tjeerd,
I actually was posting the name and password as you
suggested. The problem was that createSession defined in
IMP.php expected $HTTP_POST_VARS['server'] to have been
posted, and I was not posting it. So, the redirect.php was
failing to log me in. When I added
<input type=hidden name=server value=\"mail.wsu.edu\" />
to your script it worked for me. thanks for the pointers.
-- dean
On Thu, 5 Sep 2002 09:58:54 +0200 Tjeerd van der Zee <Tjeerd van der Zee <admin@xar.nl>> wrote:
> Hi,
>
> first of all, you can't do it without the form, the user data, like login
> name and
> password need to be posted on redirect !
>
> but you can post an url on the script below,
>
> try this,
>
> http://your.server.com/loginscriptbelow?imapuser=user&pass=password
>
> this should do the trick.
>
> if this doesn't work, look at the login.php file of imp, and find out wha=
t
> the new
> name is for pass since it doesn't get filled in, i'am still running an ol=
d
> cvs version
> of horde/imp and i'am quite happy with it.
>
> i'll do an upgrade today, if something major has changed i'll fix it and
> send you
> the new one.
>
> With kind regards,
>
> Tjeerd van der Zee
>
>
> ----- Original Message -----
> From: "Dean Guenther" <guenther@wsu.edu>
> To: <imp@lists.horde.org>
> Sent: Wednesday, September 04, 2002 9:15 PM
> Subject: [imp] accessing from a URL not a form
>
>
> Greetings, I'm trying to do a login without using the form.
> I saw in the archives discussion between Brad Vedders and
> Tjeerd van der Zee and Tjeerd's snippit:
>
> > <?
> > $imapuser = $_GET['imapuser'];
> > $pass = $_GET['pass'];
> > $realm = $_GET['realm'];
> > $imapuser = "$imapuser@$realm";
> >
> > print ("
> > <html>
> > <head>
> > </head>
> > <body bgcolor=\"#444466\" Onload=\"javascript:document.redirect.sub=
mit()\"
> >
> > <form name=redirect action=\"http://mail.xar.nl/imp/redirect.php\"
> > method=post>
> > <input type=hidden name=actionID value=\"105\" />
> > <input type=hidden name=redirect_url value=\"\" />
> > <input type=hidden name=mailbox value=\"INBOX.\" />
> > <input type=hidden name=imapuser value=$imapuser>
> > <input type=hidden name=pass value=$pass>
> > </form>
> > </body>
> > </html>
> > ");
> > ?>
>
> When I use this method, what happens is that it calls redirect.php
> which in turn calls login.php (and css.php) and it displays
> the login page with the imapuser filled in, but it appears
> that the "pass" is not sent along. It gives a failed in login
> message on the login page:
>
> Login failed for some reason. Most likely your username
> or password was entered incorrectly.
>
> What am I missing?? -- Dean
>
> --
> Dean Guenther Internet: guenther@wsu.edu
> Washington State University AT&T: 509 335-0433
> Pullman, WA. 99164-1222 fax: 509 335-0540
> www & UNIX System Admin
>
>
>
> --
> IMP mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>
>
--
Dean Guenther Internet: guenther@wsu.edu
Washington State University AT&T: 509 335-0433
Pullman, WA. 99164-1222 fax: 509 335-0540
www & UNIX System Admin