mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
Fix missing error message for inactive users [#1598]
(This is only actually a one line change, but the resulting indent change makes for a large block in the code changes unfortunately) git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5835 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d98e3d00d2
commit
46adf29d8b
1 changed files with 16 additions and 16 deletions
|
@ -118,23 +118,23 @@ if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($
|
||||||
WHERE user_id = ' . $row['user_id'];
|
WHERE user_id = ' . $row['user_id'];
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
|
|
||||||
$redirect = str_replace('?', '&', $redirect);
|
|
||||||
|
|
||||||
if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
|
|
||||||
{
|
|
||||||
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
|
|
||||||
);
|
|
||||||
|
|
||||||
$message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
|
|
||||||
|
|
||||||
message_die(GENERAL_MESSAGE, $message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
|
||||||
|
$redirect = str_replace('?', '&', $redirect);
|
||||||
|
|
||||||
|
if (strstr(urldecode($redirect), "\n") || strstr(urldecode($redirect), "\r"))
|
||||||
|
{
|
||||||
|
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
|
||||||
|
);
|
||||||
|
|
||||||
|
$message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
|
||||||
|
|
||||||
|
message_die(GENERAL_MESSAGE, $message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue