|
From: Jamessketch <jam...@gm...> - 2007-10-14 16:05:17
|
Hello there, I run SM 1.5.1., plugins: compatibility, vlogin, email_footer, filters, login_auto, username, check_quota. 1) I can successfully login to SM with ticking the box to 'Remember my Name & Password'. After logging in I am on 'webmail.php'. 2) If I close the window and then in a new window go to 'login.php' it will perfectly sign me in to 'webmail.php'. This is how it should be. 3) But if I close the window and then in a new window go straight to 'webmail.php' error will appear with 'You must be logged in to access this page.' And than if I click on the link underneath this error it will successfully sign me in without doing anything. So it looks like it really needed the page 'login.php' to sign me automatically. I suspect that it is ME that is doing something bad due to inability to find similar issue here. Thank you for your help. -- View this message in context: http://www.nabble.com/%27You-must-be-logged-in-to-access-this-page.%27-after-going-to-%27webmail.php%27-%28plugin-%27login_auto%27%29-tf4622255.html#a13200351 Sent from the squirrelmail-devel mailing list archive at Nabble.com. |
|
From: Paul L. <pa...@sq...> - 2007-10-15 21:30:59
|
On 10/14/07, Jamessketch <jam...@gm...> wrote: > > Hello there, > > I run SM 1.5.1., plugins: compatibility, vlogin, email_footer, filters, > login_auto, username, check_quota. Please don't expect support for 1.5.1, and ESPECIALLY for plugins under 1.5.1. If you want to use our development code, please get a 1.5.2 snapshot. Even then, you should not expect many plugins to work there yet, as the code is too new. If you ask nicely or provide patches, plugin authors may upgrade their plugins as time allows, but keep in mind that the development stream is a moving target, so many people won't be too worried about supporting it just yet. > 1) I can successfully login to SM with ticking the box to 'Remember my Name > & Password'. After logging in I am on 'webmail.php'. > 2) If I close the window and then in a new window go to 'login.php' it will > perfectly sign me in to 'webmail.php'. This is how it should be. > 3) But if I close the window and then in a new window go straight to > 'webmail.php' error will appear with 'You must be logged in to access this > page.' And than if I click on the link underneath this error it will > successfully sign me in without doing anything. So it looks like it really > needed the page 'login.php' to sign me automatically. > > I suspect that it is ME that is doing something bad due to inability to find > similar issue here. > > Thank you for your help. |
|
From: Jon A. <jo...@sq...> - 2007-11-10 05:37:10
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Jamessketch > Hello there, > I run SM 1.5.1., plugins: compatibility, vlogin, email_footer, filters, > login_auto, username, check_quota. > 1) I can successfully login to SM with ticking the box to 'Remember my Na= me > & Password'. After logging in I am on 'webmail.php'. > 2) If I close the window and then in a new window go to 'login.php' it wi= ll > perfectly sign me in to 'webmail.php'. This is how it should be. > 3) But if I close the window and then in a new window go straight to > 'webmail.php' error will appear with 'You must be logged in to access this > page.' And than if I click on the link underneath this error it will > successfully sign me in without doing anything. So it looks like it really > needed the page 'login.php' to sign me automatically. > I suspect that it is ME that is doing something bad due to inability to f= ind > similar issue here. See point 3. The login_auto plugin relies on hooks in the login page, and redirect page. By accessing webmail.php directly, you're skipping both of those hooks. This could be added as a feature request for the login_auto plugin. - -- Jon Angliss <jo...@sq... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHNUN5K4PoFPj9H3MRAg8BAJ9fK8BCUky+ukLd1/9SC2HRsNNrsACg+IaY PlHM/tSjXHTcbcDBOY9UO3w=3D =3DkMAp -----END PGP SIGNATURE----- |
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-15 12:45:16
|
On 11/10/07, Jon Angliss <jo...@sq...> wrote: > > Hi Jamessketch > > > Hello there, > > > I run SM 1.5.1., plugins: compatibility, vlogin, email_footer, filters, > > login_auto, username, check_quota. > > > 1) I can successfully login to SM with ticking the box to 'Remember my Name > > & Password'. After logging in I am on 'webmail.php'. > > 2) If I close the window and then in a new window go to 'login.php' it will > > perfectly sign me in to 'webmail.php'. This is how it should be. > > 3) But if I close the window and then in a new window go straight to > > 'webmail.php' error will appear with 'You must be logged in to access this > > page.' And than if I click on the link underneath this error it will > > successfully sign me in without doing anything. So it looks like it really > > needed the page 'login.php' to sign me automatically. > > > I suspect that it is ME that is doing something bad due to inability to find > > similar issue here. > > See point 3. The login_auto plugin relies on hooks in the login page, > and redirect page. By accessing webmail.php directly, you're skipping > both of those hooks. This could be added as a feature request for the > login_auto plugin. I would also like to request this feature for login_auto (when time permits). (Paul, you may remember me requesting this a *while* ago.) Having webmail.php autolog you back in is important because of Opera's and Firefox's "Continue from last time/session" feature. If you close the browser while you're viewing your inbox and start back up, webmail.php will be loaded, but you won't be autologged for the reasons you explained. -- Michael |
|
From: Jon A. <jo...@sq...> - 2007-11-16 04:52:29
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Michael
>>> I run SM 1.5.1., plugins: compatibility, vlogin, email_footer,
>>> filters, login_auto, username, check_quota.
>>> 1) I can successfully login to SM with ticking the box to
>>> 'Remember my Name & Password'. After logging in I am on
>>> 'webmail.php'.
>>> 2) If I close the window and then in a new window go to
>>> 'login.php' it will perfectly sign me in to 'webmail.php'. This is
>>> how it should be.
>>> 3) But if I close the window and then in a new window go straight
>>> to 'webmail.php' error will appear with 'You must be logged in to
>>> access this page.' And than if I click on the link underneath this
>>> error it will successfully sign me in without doing anything. So
>>> it looks like it really needed the page 'login.php' to sign me
>>> automatically.
>>> I suspect that it is ME that is doing something bad due to
>>> inability to find similar issue here.
>> See point 3. The login_auto plugin relies on hooks in the login
>> page, and redirect page. By accessing webmail.php directly, you're
>> skipping both of those hooks. This could be added as a feature
>> request for the login_auto plugin.
> I would also like to request this feature for login_auto (when time
> permits). (Paul, you may remember me requesting this a *while* ago.)
> Having webmail.php autolog you back in is important because of Opera's
> and Firefox's "Continue from last time/session" feature.
> If you close the browser while you're viewing your inbox and start
> back up, webmail.php will be loaded, but you won't be autologged for
> the reasons you explained.
Doing some research on this, it might not be too difficult, you
*should* be able to catch this in the logout_error hook. It's a bit of
a "cheap shot" so to speak, but you can probably do something like
this:
function login_auto_logout_err() {
if (defined('PAGE_NAME') && (PAGE_NAME =3D=3D 'webmail')) {
if (!empty($_COOKIE['user'])) {
header('Location: ' . SM_PATH . 'src/login.php');
}
}
}
This forces a redirect to the login page, only if the page is webmail,
and the login_auto cookie 'user' is set. This will allow the normal
login_auto code to kick in. You'll also need to update the
squirrelmail_plugin_hooks, which is in the _init function in
login_auto/setup.php.
$squirrelmail_plugin_hooks['logout_error']['login_auto'] =3D 'login_auto_lo=
gout_err';
- --
Jon Angliss
<jo...@sq...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFHPSIDK4PoFPj9H3MRAnU5AKCsT9XqPFfrXfu5kRbKg7BBCZ70TgCfZGYi
KWZ/kUiY9tEM0zVTJSy3LYQ=3D
=3Dz6LH
-----END PGP SIGNATURE-----
|
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-16 15:02:54
|
On 11/15/07, Jon Angliss <jo...@sq...> wrote:
> Doing some research on this, it might not be too difficult, you
> *should* be able to catch this in the logout_error hook. It's a bit of
> a "cheap shot" so to speak, but you can probably do something like
> this:
>
> function login_auto_logout_err() {
> if (defined('PAGE_NAME') && (PAGE_NAME == 'webmail')) {
> if (!empty($_COOKIE['user'])) {
> header('Location: ' . SM_PATH . 'src/login.php');
> }
> }
> }
>
> This forces a redirect to the login page, only if the page is webmail,
> and the login_auto cookie 'user' is set. This will allow the normal
> login_auto code to kick in. You'll also need to update the
> squirrelmail_plugin_hooks, which is in the _init function in
> login_auto/setup.php.
>
> $squirrelmail_plugin_hooks['logout_error']['login_auto'] = 'login_auto_logout_err';
Thanks.
O.K. in login_auto/setup.php, I have (showing relevant parts only):
function squirrelmail_plugin_init_login_auto() {
$squirrelmail_plugin_hooks['logout_error']['login_auto'] =
'login_auto_logout_err';
}
function login_auto_logout_err() {
if (defined('SM_PATH'))
include_once(SM_PATH . 'plugins/login_auto/functions.php');
else
include_once('../plugins/login_auto/functions.php');
login_auto_logout_err_do();
}
In login_auto/functions.php, I have (showing relevant parts only):
function login_auto_logout_err_do() {
if (defined('PAGE_NAME') && (PAGE_NAME == 'webmail')) {
if (!empty($_COOKIE['user'])) {
header('Location: ' . SM_PATH . 'src/login.php');
}
}
}
login_auto_logout_err_do() never seems to be called and no redirection happens.
login_auto_logout_err never seems to be called either.
Do I have something incorrect?
I just skipped all that and edited functions/display_messages.php.
I added:
header('Location: ' . SM_PATH . 'src/login.php');
right before:
list($junk, $errString, $errTitle, $logout_link)
= do_hook('logout_error', $errString, $errTitle, $logout_link);
and it works great.
How can I accomplish that from login_auto?
Thanks.
--
Michael
|
|
From: Jon A. <jo...@sq...> - 2007-11-16 15:52:18
Attachments:
login_auto_webmail.patch
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Michael
> On 11/15/07, Jon Angliss <jo...@sq...> wrote:
>> Doing some research on this, it might not be too difficult, you
>> *should* be able to catch this in the logout_error hook. It's a bit of
>> a "cheap shot" so to speak, but you can probably do something like
>> this:
>> function login_auto_logout_err() {
>> if (defined('PAGE_NAME') && (PAGE_NAME =3D=3D 'webmail')) {
>> if (!empty($_COOKIE['user'])) {
>> header('Location: ' . SM_PATH . 'src/login.php');
>> }
>> }
>> }
>> This forces a redirect to the login page, only if the page is webmail,
>> and the login_auto cookie 'user' is set. This will allow the normal
>> login_auto code to kick in. You'll also need to update the
>> squirrelmail_plugin_hooks, which is in the _init function in
>> login_auto/setup.php.
>>
>> $squirrelmail_plugin_hooks['logout_error']['login_auto'] =3D 'login_auto=
_logout_err';
> Thanks.
> O.K. in login_auto/setup.php, I have (showing relevant parts only):
[..]
> login_auto_logout_err_do() never seems to be called and no redirection ha=
ppens.
> login_auto_logout_err never seems to be called either.
> Do I have something incorrect?
What SM version are you using? The 1.5.2-svn builds a static PHP array
from the plugins, so you'd need to rerun the configuration util. I
just applied it to my login_auto 1.1, and SM 1.4.12-svn setup, and got
it working fine. I've included a patch.
- --
Jon Angliss
<jo...@sq...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFHPbykK4PoFPj9H3MRAjTPAJsEqQJnHzv0t0wPofbLN9ceoW2faACgnXmF
eEQFlhqn3jxuJ+mj2+EkS/o=3D
=3Df9ZZ
-----END PGP SIGNATURE----- |
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-16 21:02:22
|
On 11/16/07, Jon Angliss <jo...@sq...> wrote: > What SM version are you using? The 1.5.2-svn builds a static PHP array > from the plugins, so you'd need to rerun the configuration util. I > just applied it to my login_auto 1.1, and SM 1.4.12-svn setup, and got > it working fine. I've included a patch. I'll get back with you later. I want to check to see if login_alias or ip_restrict are interfering. -- Michael |
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-16 20:33:16
|
On 11/16/07, Jon Angliss <jo...@sq...> wrote:
> Hi Michael
>
> > On 11/15/07, Jon Angliss <jo...@sq...> wrote:
> >> Doing some research on this, it might not be too difficult, you
> >> *should* be able to catch this in the logout_error hook. It's a bit of
> >> a "cheap shot" so to speak, but you can probably do something like
> >> this:
>
> >> function login_auto_logout_err() {
> >> if (defined('PAGE_NAME') && (PAGE_NAME == 'webmail')) {
> >> if (!empty($_COOKIE['user'])) {
> >> header('Location: ' . SM_PATH . 'src/login.php');
> >> }
> >> }
> >> }
>
> >> This forces a redirect to the login page, only if the page is webmail,
> >> and the login_auto cookie 'user' is set. This will allow the normal
> >> login_auto code to kick in. You'll also need to update the
> >> squirrelmail_plugin_hooks, which is in the _init function in
> >> login_auto/setup.php.
> >>
> >> $squirrelmail_plugin_hooks['logout_error']['login_auto'] = 'login_auto_logout_err';
>
> > Thanks.
>
> > O.K. in login_auto/setup.php, I have (showing relevant parts only):
>
> [..]
>
> > login_auto_logout_err_do() never seems to be called and no redirection happens.
> > login_auto_logout_err never seems to be called either.
>
> > Do I have something incorrect?
>
> What SM version are you using? The 1.5.2-svn builds a static PHP array
> from the plugins, so you'd need to rerun the configuration util. I
> just applied it to my login_auto 1.1, and SM 1.4.12-svn setup, and got
> it working fine. I've included a patch.
Using 1.4.11. (I can test it with any version you want, but 1.4.11 is
the one I'm trying to get it to work on.)
Anyway, it still does not work. The function is never called. (The
plugin still works fine otherwise)
However, I figured out when the function is called. It's called only
if I try to log in with an incorrect username/password. However,
that's not what I'm trying to accomplish and the correct login info is
still stored in my cookies. It's just webmail.php doesn't accept it.
Just to be clear:
In Opera (which defaults to continue from last time):
1. Goto login.php and log in.
(you'll then be at webmail.php and logged in)
2. Close Opera without closing the webmail.php tab.
3. Start Opera
When Opera starts, webmail.php will be reloaded. Then, since
webmail.php doesn't autolog you back in, I expect to be redirected to
login.php (so it can autolog me back in) instead of getting the "you
must be logged in" error page.
The problem is, the logout_error hook isn't activated in that
situation (or at least it's not activated in a way that
login_auto_logout_err_do() is called)
Thanks.
--
Michael
|
|
From: Paul L. <pa...@sq...> - 2007-11-16 21:45:56
|
On Nov 16, 2007 12:33 PM, Michael A. Puls II <sha...@gm...> wrote:
>
> On 11/16/07, Jon Angliss <jo...@sq...> wrote:
> > Hi Michael
> >
> > > On 11/15/07, Jon Angliss <jo...@sq...> wrote:
> > >> Doing some research on this, it might not be too difficult, you
> > >> *should* be able to catch this in the logout_error hook. It's a bit of
> > >> a "cheap shot" so to speak, but you can probably do something like
> > >> this:
> >
> > >> function login_auto_logout_err() {
> > >> if (defined('PAGE_NAME') && (PAGE_NAME == 'webmail')) {
> > >> if (!empty($_COOKIE['user'])) {
> > >> header('Location: ' . SM_PATH . 'src/login.php');
> > >> }
> > >> }
> > >> }
> >
> > >> This forces a redirect to the login page, only if the page is webmail,
> > >> and the login_auto cookie 'user' is set. This will allow the normal
> > >> login_auto code to kick in. You'll also need to update the
> > >> squirrelmail_plugin_hooks, which is in the _init function in
> > >> login_auto/setup.php.
> > >>
> > >> $squirrelmail_plugin_hooks['logout_error']['login_auto'] = 'login_auto_logout_err';
> >
> > > Thanks.
> >
> > > O.K. in login_auto/setup.php, I have (showing relevant parts only):
> >
> > [..]
> >
> > > login_auto_logout_err_do() never seems to be called and no redirection happens.
> > > login_auto_logout_err never seems to be called either.
> >
> > > Do I have something incorrect?
> >
> > What SM version are you using? The 1.5.2-svn builds a static PHP array
> > from the plugins, so you'd need to rerun the configuration util. I
> > just applied it to my login_auto 1.1, and SM 1.4.12-svn setup, and got
> > it working fine. I've included a patch.
>
> Using 1.4.11. (I can test it with any version you want, but 1.4.11 is
> the one I'm trying to get it to work on.)
>
> Anyway, it still does not work. The function is never called. (The
> plugin still works fine otherwise)
>
> However, I figured out when the function is called. It's called only
> if I try to log in with an incorrect username/password. However,
> that's not what I'm trying to accomplish and the correct login info is
> still stored in my cookies. It's just webmail.php doesn't accept it.
>
> Just to be clear:
>
> In Opera (which defaults to continue from last time):
>
> 1. Goto login.php and log in.
> (you'll then be at webmail.php and logged in)
> 2. Close Opera without closing the webmail.php tab.
> 3. Start Opera
> When Opera starts, webmail.php will be reloaded. Then, since
> webmail.php doesn't autolog you back in, I expect to be redirected to
> login.php (so it can autolog me back in) instead of getting the "you
> must be logged in" error page.
>
> The problem is, the logout_error hook isn't activated in that
> situation (or at least it's not activated in a way that
> login_auto_logout_err_do() is called)
>From 1.4.12SVN snapshot ChangeLog:
- Revived logout_error hook (#1800015).
As for Jon's "hack", I was going to suggest that webmail.php should
use the proper login_auto code instead of trying to catch the logout
error, HOWEVER, I think his solution is more elegant, because it
allows auto login on other pages as well. I haven't looked at the
patch yet, but seems like it could work fine.
-paul
|
|
From: Jon A. <jo...@sq...> - 2007-11-16 22:10:25
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Paul
> On Nov 16, 2007 12:33 PM, Michael A. Puls II <sha...@gm...> wrote:
>>
>> On 11/16/07, Jon Angliss <jo...@sq...> wrote:
>> > Hi Michael
>> >
>> > > On 11/15/07, Jon Angliss <jo...@sq...> wrote:
>> > >> Doing some research on this, it might not be too difficult, you
>> > >> *should* be able to catch this in the logout_error hook. It's a bit=
of
>> > >> a "cheap shot" so to speak, but you can probably do something like
>> > >> this:
>> >
>> > >> function login_auto_logout_err() {
>> > >> if (defined('PAGE_NAME') && (PAGE_NAME =3D=3D 'webmail')) {
>> > >> if (!empty($_COOKIE['user'])) {
>> > >> header('Location: ' . SM_PATH . 'src/login.php');
>> > >> }
>> > >> }
>> > >> }
>> >
>> > >> This forces a redirect to the login page, only if the page is webma=
il,
>> > >> and the login_auto cookie 'user' is set. This will allow the normal
>> > >> login_auto code to kick in. You'll also need to update the
>> > >> squirrelmail_plugin_hooks, which is in the _init function in
>> > >> login_auto/setup.php.
>> > >>
>> > >> $squirrelmail_plugin_hooks['logout_error']['login_auto'] =3D 'login=
_auto_logout_err';
>> >
>> > > Thanks.
>> >
>> > > O.K. in login_auto/setup.php, I have (showing relevant parts only):
>> >
>> > [..]
>> >
>> > > login_auto_logout_err_do() never seems to be called and no redirecti=
on happens.
>> > > login_auto_logout_err never seems to be called either.
>> >
>> > > Do I have something incorrect?
>> >
>> > What SM version are you using? The 1.5.2-svn builds a static PHP array
>> > from the plugins, so you'd need to rerun the configuration util. I
>> > just applied it to my login_auto 1.1, and SM 1.4.12-svn setup, and got
>> > it working fine. I've included a patch.
>>
>> Using 1.4.11. (I can test it with any version you want, but 1.4.11 is
>> the one I'm trying to get it to work on.)
>>
>> Anyway, it still does not work. The function is never called. (The
>> plugin still works fine otherwise)
>>
>> However, I figured out when the function is called. It's called only
>> if I try to log in with an incorrect username/password. However,
>> that's not what I'm trying to accomplish and the correct login info is
>> still stored in my cookies. It's just webmail.php doesn't accept it.
>>
>> Just to be clear:
>>
>> In Opera (which defaults to continue from last time):
>>
>> 1. Goto login.php and log in.
>> (you'll then be at webmail.php and logged in)
>> 2. Close Opera without closing the webmail.php tab.
>> 3. Start Opera
>> When Opera starts, webmail.php will be reloaded. Then, since
>> webmail.php doesn't autolog you back in, I expect to be redirected to
>> login.php (so it can autolog me back in) instead of getting the "you
>> must be logged in" error page.
>>
>> The problem is, the logout_error hook isn't activated in that
>> situation (or at least it's not activated in a way that
>> login_auto_logout_err_do() is called)
>>From 1.4.12SVN snapshot ChangeLog:
> - Revived logout_error hook (#1800015).
> As for Jon's "hack", I was going to suggest that webmail.php should
> use the proper login_auto code instead of trying to catch the logout
> error,
I'm not sure how you'd do that without modifying webmail.php. The
problem is, validate.php is the first page called, which starts a
session (global.php), then checks to see if the user_is_logged_in is
set in the session, if not, the logout_error is triggered.
The first hook you could tie into would be the preference related
ones, which don't appear until _after_ the logged in state is
validated.
> HOWEVER, I think his solution is more elegant, because it allows
> auto login on other pages as well. I haven't looked at the patch
> yet, but seems like it could work fine.
The patch specifically works on webmail.php because I look at
PAGE_NAME, however that can be tweaked/removed.
- --
Jon Angliss
<jo...@sq...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFHPhVEK4PoFPj9H3MRAh81AKCpnh73UsD35s9j+7WbFVb+hownqACeJDBY
ZU/tp8mqr6gf0TdluOnCiHc=3D
=3Djsn2
-----END PGP SIGNATURE-----
|
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-17 16:33:31
Attachments:
login_auto-1.2-1.2.tar.gz
|
On 11/16/07, Jon Angliss <jo...@sq...> wrote: > The patch specifically works on webmail.php because I look at > PAGE_NAME, however that can be tweaked/removed. Attached is an updated login_auto with your fix. It's working as expected for me. Thanks. -- Michael |
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-17 11:13:09
|
On 11/16/07, Paul Lesniewski <pa...@sq...> wrote: > >From 1.4.12SVN snapshot ChangeLog: > > - Revived logout_error hook (#1800015). :) Thanks. Will try it out on that version and report back. -- Michael |
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-17 11:59:46
|
On 11/17/07, Michael A. Puls II <sha...@gm...> wrote: > On 11/16/07, Paul Lesniewski <pa...@sq...> wrote: > > >From 1.4.12SVN snapshot ChangeLog: > > > > - Revived logout_error hook (#1800015). > > :) Thanks. > > Will try it out on that version and report back. Actually, I just looked at the patch and fixed plugin.php. Now Jon's fix does indeed work. Thanks to both. I'll use it for a while to make sure everything's cool and let you know. -- Michael |
|
From: Jamessketch <jam...@gm...> - 2007-11-23 17:43:12
|
Hello all and thank you for replying to this post.
I am sorry to bother you more but unfortunatelly this patch still does not
work for me.
When I have tryed to use it in console (patch -p0 <
login_auto_webmail.patch) it reported:
(Stripping trailing CRs from patch.)
patching file login_auto/functions.php
(Stripping trailing CRs from patch.)
patching file login_auto/setup.php
Hunk #2 succeeded at 41 with fuzz 2.
Than everything work as nothing was changed. I have just try to use this
patch after everything was installed and fully working. I use Squirrelmail
1.4.11.
Thank you for any help. Have a nice day.
James
Jon Angliss wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Michael
>
>> On 11/15/07, Jon Angliss <jo...@sq...> wrote:
>>> Doing some research on this, it might not be too difficult, you
>>> *should* be able to catch this in the logout_error hook. It's a bit of
>>> a "cheap shot" so to speak, but you can probably do something like
>>> this:
>
>>> function login_auto_logout_err() {
>>> if (defined('PAGE_NAME') && (PAGE_NAME == 'webmail')) {
>>> if (!empty($_COOKIE['user'])) {
>>> header('Location: ' . SM_PATH . 'src/login.php');
>>> }
>>> }
>>> }
>
>>> This forces a redirect to the login page, only if the page is webmail,
>>> and the login_auto cookie 'user' is set. This will allow the normal
>>> login_auto code to kick in. You'll also need to update the
>>> squirrelmail_plugin_hooks, which is in the _init function in
>>> login_auto/setup.php.
>>>
>>> $squirrelmail_plugin_hooks['logout_error']['login_auto'] =
>>> 'login_auto_logout_err';
>
>> Thanks.
>
>> O.K. in login_auto/setup.php, I have (showing relevant parts only):
>
> [..]
>
>> login_auto_logout_err_do() never seems to be called and no redirection
>> happens.
>> login_auto_logout_err never seems to be called either.
>
>> Do I have something incorrect?
>
> What SM version are you using? The 1.5.2-svn builds a static PHP array
> from the plugins, so you'd need to rerun the configuration util. I
> just applied it to my login_auto 1.1, and SM 1.4.12-svn setup, and got
> it working fine. I've included a patch.
>
> - --
> Jon Angliss
> <jo...@sq...
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
>
> iD8DBQFHPbykK4PoFPj9H3MRAjTPAJsEqQJnHzv0t0wPofbLN9ceoW2faACgnXmF
> eEQFlhqn3jxuJ+mj2+EkS/o=
> =f9ZZ
> -----END PGP SIGNATURE-----
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> -----
> squirrelmail-devel mailing list
> Posting guidelines: http://squirrelmail.org/postingguidelines
> List address: squ...@li...
> List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
> List info (subscribe/unsubscribe/change options):
> https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
>
--
View this message in context: http://www.nabble.com/%27You-must-be-logged-in-to-access-this-page.%27-after-going-to-%27webmail.php%27-%28plugin-%27login_auto%27%29-tf4622255.html#a13916147
Sent from the squirrelmail-devel mailing list archive at Nabble.com.
|
|
From: Jonathan A. <jo...@sq...> - 2007-11-24 06:41:04
|
> > Hello all and thank you for replying to this post. > > I am sorry to bother you more but unfortunatelly > http://www.nabble.com/file/p13916147/login_auto_webmail.patch patch you > provided still does not work for me. > > When I have tryed to use it in console (patch -p0 < > login_auto_webmail.patch) it reported: > (Stripping trailing CRs from patch.) > patching file login_auto/functions.php > (Stripping trailing CRs from patch.) > patching file login_auto/setup.php > Hunk #2 succeeded at 41 with fuzz 2. > > Than everything work as nothing was changed. I have just try to use > http://www.nabble.com/file/p13916147/login_auto_webmail.patch patch you > provided after everything was installed and fully working. I use > Squirrelmail 1.4.11. http://article.gmane.org/gmane.mail.squirrelmail.devel/9038 You might want to grab a copy of a 1.4.12-SVN snapshot. Or at the least, find out what fix was applied for the above mentioned bug, and apply to your 1.4.11 branch. -- Jonathan Angliss <jo...@sq...> |
|
From: Michael A. P. I. <sha...@gm...> - 2007-11-24 20:09:03
|
On 11/23/07, Jamessketch <jam...@gm...> wrote: > > Hello all and thank you for replying to this post. > > I am sorry to bother you more but unfortunatelly this patch still does not > work for me. > > When I have tryed to use it in console (patch -p0 < > login_auto_webmail.patch) it reported: > (Stripping trailing CRs from patch.) > patching file login_auto/functions.php > (Stripping trailing CRs from patch.) > patching file login_auto/setup.php > Hunk #2 succeeded at 41 with fuzz 2. > > Than everything work as nothing was changed. I have just try to use this > patch after everything was installed and fully working. I use Squirrelmail > 1.4.11. Try the new version of login_auto I attached here: < http://article.gmane.org/gmane.mail.squirrelmail.devel/9043 >. In functions.php, there's a comment explaining how to fix 1.4.11 to make the new feature work. -- Michael |
|
From: Jamessketch <jam...@gm...> - 2007-11-25 19:53:24
|
That is fantastic, it is finally working. Thank you all very much! James Shadow2531-2 wrote: > > On 11/23/07, Jamessketch <jam...@gm...> wrote: >> >> Hello all and thank you for replying to this post. >> >> I am sorry to bother you more but unfortunatelly this patch still does >> not >> work for me. >> >> When I have tryed to use it in console (patch -p0 < >> login_auto_webmail.patch) it reported: >> (Stripping trailing CRs from patch.) >> patching file login_auto/functions.php >> (Stripping trailing CRs from patch.) >> patching file login_auto/setup.php >> Hunk #2 succeeded at 41 with fuzz 2. >> >> Than everything work as nothing was changed. I have just try to use this >> patch after everything was installed and fully working. I use >> Squirrelmail >> 1.4.11. > > Try the new version of login_auto I attached here: < > http://article.gmane.org/gmane.mail.squirrelmail.devel/9043 >. In > functions.php, there's a comment explaining how to fix 1.4.11 to make > the new feature work. > > -- > Michael > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ----- > squirrelmail-devel mailing list > Posting guidelines: http://squirrelmail.org/postingguidelines > List address: squ...@li... > List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel > List info (subscribe/unsubscribe/change options): > https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel > > -- View this message in context: http://www.nabble.com/%27You-must-be-logged-in-to-access-this-page.%27-after-going-to-%27webmail.php%27-%28plugin-%27login_auto%27%29-tf4622255.html#a13939151 Sent from the squirrelmail-devel mailing list archive at Nabble.com. |