mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Login flow consistency: Do not use redirect in admin area login box
The non-admin login flow does not perform a redirect, but the admin login flow did. This led to an inconsistency in how the authentication error message was passed. Fixes: https://github.com/e107inc/e107/issues/4779
This commit is contained in:
@@ -134,12 +134,7 @@ else
|
||||
{
|
||||
e107::coreLan('log_messages', true);
|
||||
e107::getLog()->addEvent(4, __FILE__."|".__FUNCTION__."@".__LINE__, "LOGIN", LAN_ROLL_LOG_11, "U: ".e107::getParser()->toDB($_POST['authname']), FALSE, LOG_TO_ROLLING);
|
||||
|
||||
e107::getRedirect()->redirect('admin.php?failed');
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -274,28 +269,20 @@ class auth
|
||||
// Start Clean
|
||||
// NOTE: this should NOT be a template of the admin-template, however themes may style it using css.
|
||||
|
||||
$class = (e_QUERY === 'failed') ? "class='e-shake'" : "";
|
||||
|
||||
$text = "<form id='admin-login' method='post' action='".e_SELF."' {$incChap} >
|
||||
<div id='logo' ><img src='".e_IMAGE."logo_template_large.png' alt='".LAN_LOGIN."' /></div>
|
||||
<div id='login-admin' class='center'>
|
||||
<div>";
|
||||
|
||||
if(e_QUERY === 'failed')
|
||||
{
|
||||
e107::lan('core', 'login');
|
||||
$text .= e107::getMessage()->render(); // see e107_handlers/login.php L622
|
||||
$text .= "<script>
|
||||
window.setTimeout(function() {
|
||||
$('.alert').fadeTo(500, 0).slideUp(500, function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}, 7000);
|
||||
</script>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
e107::lan('core', 'login');
|
||||
$text .= e107::getMessage()->render(); // see e107_handlers/login.php L622
|
||||
$text .= "<script>
|
||||
window.setTimeout(function() {
|
||||
$('.alert').fadeTo(500, 0).slideUp(500, function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}, 7000);
|
||||
</script>";
|
||||
|
||||
$text .= "
|
||||
<div class='panel well panel-primary'>
|
||||
|
Reference in New Issue
Block a user