From: Cor B. <co...@xs...> - 2007-11-30 09:41:13
|
> Sorry you didn't get any response on this - it's been quite a while. > I was just noticing a fix I had in functions/display_messages.php for > what I think is the same problem, but I had never committed it to SVN, > and at this point, I forgot the exact scenario that it was intended to > fix. It is looking to me like this may have been resolved by another > fix I made to restore the logout_error hook, but, again, because I > don't remember the specific scenario I was testing when I fixed this, > I'm not 100% sure. > > What I tried just now was: I logged in, killed my session file, then > clicked on a link and watched to see if that hook would fire (using > the login_redirect plugin to test). It did seem to be working without > any fix needed. If you don't mind getting back into this problem, can > you first verify that you still experience the issue? > > FYI, this was the fix I had for it, but, as I mentioned, I don't think > this is needed any more: > > Index: functions/display_messages.php > =================================================================== > --- functions/display_messages.php (revision 12767) > +++ functions/display_messages.php (working copy) > @@ -46,6 +46,12 @@ > $hide_sm_attributions, $version, $squirrelmail_language, > $color, $theme, $theme_default; > > + // in some cases, the plugin hooks array is not yet loaded; this > + // is something of a hacked solution, but STABLE is a mess like > + // that - the real solution is a better centralized init routine > + // as in DEVEL > + require_once(SM_PATH . 'functions/plugin.php'); > + > $base_uri = sqm_baseuri(); > > include_once( SM_PATH . 'functions/page_header.php' ); Hi Paul, this does not fix it for me. Here's what I do: - stock 1.4.11 - 2 plugins 1) hooks into login stuff and gives our own login screen 2) hooks into logout and logout_error and redirects to login on error (it passes a msg as well, so we can say 'you logged out' or 'an error occured'). - with the above patch on stock 1.4.11, if I clear my session cookies my logout plugin isnt called. I have an error_log in the plugin that doesnt write anything either, so im fairly certain the plugin isnt called. - if I do my original hack (add "global $plugins" to auth.php/is_logged_in) my logout plugin is called, and works fine. I think my original description still holds. Because of the long chain of includes and requires, the plugin.php is actually not included in logout_error(). It has been included earlier in the chain, but the content of $plugins gets lost before we reach logout_error()' Cor |