diff --git a/bl-kernel/admin/controllers/login-email.php b/bl-kernel/admin/controllers/login-email.php
index 0c8101dd..685f7a60 100644
--- a/bl-kernel/admin/controllers/login-email.php
+++ b/bl-kernel/admin/controllers/login-email.php
@@ -91,7 +91,7 @@ function checkGet($args)
}
// Bruteforce protection, add IP to blacklist.
- $Security->addLoginFail();
+ $Security->addToBlacklist();
return false;
}
diff --git a/bl-kernel/admin/controllers/login.php b/bl-kernel/admin/controllers/login.php
index 7a3b8b22..63f18990 100644
--- a/bl-kernel/admin/controllers/login.php
+++ b/bl-kernel/admin/controllers/login.php
@@ -8,27 +8,26 @@
// Functions
// ============================================================================
-function checkPost($args)
+function checkLogin($args)
{
global $Security;
global $Login;
global $Language;
- if($Security->isBlocked()) {
+ if ($Security->isBlocked()) {
Alert::set($Language->g('IP address has been blocked').'
'.$Language->g('Try again in a few minutes'));
return false;
}
- // Verify User sanitize the input
- if( $Login->verifyUser($_POST['username'], $_POST['password']) ) {
+ if ($Login->verifyUser($_POST['username'], $_POST['password'])) {
// Renew the token. This token will be the same inside the session for multiple forms.
$Security->generateTokenCSRF();
Redirect::page('dashboard');
return true;
}
- // Bruteforce protection, add IP to blacklist.
- $Security->addLoginFail();
+ // Bruteforce protection, add IP to the blacklist
+ $Security->addToBlacklist();
// Create alert
Alert::set($Language->g('Username or password incorrect'));
@@ -44,9 +43,9 @@ function checkPost($args)
// POST Method
// ============================================================================
-if( $_SERVER['REQUEST_METHOD'] == 'POST' )
+if ($_SERVER['REQUEST_METHOD']=='POST')
{
- checkPost($_POST);
+ checkLogin($_POST);
}
// ============================================================================
diff --git a/bl-kernel/admin/themes/default/index.php b/bl-kernel/admin/themes/default/index.php
index ddb6b3d9..a3fc509e 100644
--- a/bl-kernel/admin/themes/default/index.php
+++ b/bl-kernel/admin/themes/default/index.php
@@ -144,6 +144,9 @@ $(document).ready(function() {
Hey!';
+ echo '