#6 login.php - main.php cycle

closed-fixed
Stephen Grier
None
5
2003-05-13
2003-04-30
Yury Reshetnikov
No

SmartSieve-0.5.0devel
In case of error at sieve session object I have
received a cycle between login.php and main.php
scripts.
Please insert code for remove the sieve session
object in main.php after detection of error.

Like this (main.php lines after 23)

// if a session does not exist, go to login page
if (!is_object($sieve) || !$sieve->authenticate()) {
$HTTP_SESSION_VARS['sieve'] = null; //
new line
session_unregister('sieve'); // new line
header('Location: ' . AppSession::setUrl
('login.php'),true);
exit;
}

Discussion

  • Stephen Grier
    Stephen Grier
    2003-04-30

    Logged In: YES
    user_id=607130

    This looping behaviour is usually caused by main.php not
    being able to access the 'key' cookie. You need to set the
    correct values for $default->cookie_domain and
    $default->cookie_path in config.php. Start by setting both
    to an empty string: "".

    Your suggested code change will not solve the problem. It
    will only hide the fact that there is a cookie problem.
    However, I have committed a modified version of login.php
    which catches these browser loops and warns about the cookie
    problem.

    Can you try the modified version of login.php in the CVS and
    let me know what happens.

     
  • Stephen Grier
    Stephen Grier
    2003-04-30

    • assigned_to: nobody --> stephengrier
    • status: open --> pending
     
    • status: pending --> open
     
  • Logged In: YES
    user_id=768265

    I do not have desire again to model a situation with
    change cookie_path at presence of active sessions. Your
    decision undoubtedly is more adequate.

     
  • Stephen Grier
    Stephen Grier
    2003-05-13

    • status: open --> closed-fixed