News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Redirection after login proble

Started by Cerberus, January 13, 2006, 05:57:30 AM

Previous topic - Next topic

Cerberus

Hello!

I'm trying to make a skins for SMF which supports mobile devices and I'm testing it on my iPAQ 4700. I've noticed a strange problem: when I login I input my username and password in the login form, click login; the page keeps loading but I'm not being redirected to the board index :-\. The cookie is set, but the redirection function isn't working. The same happens with the logout :(.

I suppose there must be something forcing redirection that can be modified, as similar forms work well in other sites ::), but what exactly? Maybe in this piece of code from loginout.php? $user_settings['passwordSalt'] = substr(md5(rand()), 0, 4);
updateMemberData($ID_MEMBER, array('passwordSalt' => '\'' . $user_settings['passwordSalt'] . '\''));

setLoginCookie($timeout - time(), $ID_MEMBER, sha1($user_settings['passwd'] . $user_settings['passwordSalt']));

redirectexit('action=login2;sa=check;member=' . $ID_MEMBER, $context['server']['needs_login_fix']);
}
// Double check the cookie...
elseif (isset($_GET['sa']) && $_GET['sa'] == 'check')
{
// Strike!  You're outta there!
if ($_GET['member'] != $ID_MEMBER)
fatal_lang_error('login_cookie_error', false);

// Some whitelisting for login_url...
if (empty($_SESSION['login_url']))
redirectexit();
else
{
// Best not to clutter the session data too much...
$temp = $_SESSION['login_url'];
unset($_SESSION['login_url']);

redirectexit($temp);
}
}


I've tried to login via the SSI login, but it isn't working as well :(. Even the redirection in the wap2 version isn't working ???


Any help would be much appreciated :D
Best Regards, Cerberus
YaBB Gold -> YaBB 1.1 -> YaBB SE (YaPP -> PfaBB) -> SMF
Pocket PC Russia

Cerberus

Best Regards, Cerberus
YaBB Gold -> YaBB 1.1 -> YaBB SE (YaPP -> PfaBB) -> SMF
Pocket PC Russia

Advertisement: