Version Description
- The lockout alerts can be sent to a configurable email address now.
Download this release
Release Info
Developer | wpchefgadget |
Plugin | Limit Login Attempts Reloaded |
Version | 2.7.4 |
Comparing to | |
See all releases |
Code changes from version 2.7.3 to 2.7.4
- assets/css/limit-login-attempts.css +2 -0
- assets/sass/limit-login-attempts.scss +4 -0
- core/LimitLoginAttempts.php +9 -1
- limit-login-attempts-reloaded.php +1 -1
- readme.txt +5 -2
- views/options-page.php +7 -1
assets/css/limit-login-attempts.css
CHANGED
@@ -7,3 +7,5 @@
|
|
7 |
padding: 10px; }
|
8 |
.limit-login-page-settings .limit-login-log table tr:nth-child(even) {
|
9 |
background-color: rgba(0, 0, 0, 0.09); }
|
|
|
|
7 |
padding: 10px; }
|
8 |
.limit-login-page-settings .limit-login-log table tr:nth-child(even) {
|
9 |
background-color: rgba(0, 0, 0, 0.09); }
|
10 |
+
.limit-login-page-settings input[name="admin_notify_email"] {
|
11 |
+
min-width: 243px; }
|
assets/sass/limit-login-attempts.scss
CHANGED
@@ -14,4 +14,8 @@
|
|
14 |
}
|
15 |
}
|
16 |
}
|
|
|
|
|
|
|
|
|
17 |
}
|
14 |
}
|
15 |
}
|
16 |
}
|
17 |
+
|
18 |
+
input[name="admin_notify_email"] {
|
19 |
+
min-width: 243px;
|
20 |
+
}
|
21 |
}
|
core/LimitLoginAttempts.php
CHANGED
@@ -648,7 +648,13 @@ class Limit_Login_Attempts
|
|
648 |
$message .= sprintf( __( "IP was blocked for %s", 'limit-login-attempts-reloaded' ), $when );
|
649 |
}
|
650 |
|
651 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
|
653 |
@wp_mail( $admin_email, $subject, $message );
|
654 |
}
|
@@ -1162,6 +1168,8 @@ class Limit_Login_Attempts
|
|
1162 |
$this->update_option('long_duration', (int)$_POST['long_duration'] * 3600 );
|
1163 |
$this->update_option('notify_email_after', (int)$_POST['email_after'] );
|
1164 |
|
|
|
|
|
1165 |
$white_list_ips = ( !empty( $_POST['lla_whitelist_ips'] ) ) ? explode("\n", str_replace("\r", "", stripslashes($_POST['lla_whitelist_ips']) ) ) : array();
|
1166 |
|
1167 |
if( !empty( $white_list_ips ) ) {
|
648 |
$message .= sprintf( __( "IP was blocked for %s", 'limit-login-attempts-reloaded' ), $when );
|
649 |
}
|
650 |
|
651 |
+
if( $custom_admin_email = $this->get_option( 'admin_notify_email' ) ) {
|
652 |
+
|
653 |
+
$admin_email = $custom_admin_email;
|
654 |
+
} else {
|
655 |
+
|
656 |
+
$admin_email = $this->use_local_options ? get_option( 'admin_email' ) : get_site_option( 'admin_email' );
|
657 |
+
}
|
658 |
|
659 |
@wp_mail( $admin_email, $subject, $message );
|
660 |
}
|
1168 |
$this->update_option('long_duration', (int)$_POST['long_duration'] * 3600 );
|
1169 |
$this->update_option('notify_email_after', (int)$_POST['email_after'] );
|
1170 |
|
1171 |
+
$this->update_option('admin_notify_email', sanitize_email( $_POST['admin_notify_email'] ) );
|
1172 |
+
|
1173 |
$white_list_ips = ( !empty( $_POST['lla_whitelist_ips'] ) ) ? explode("\n", str_replace("\r", "", stripslashes($_POST['lla_whitelist_ips']) ) ) : array();
|
1174 |
|
1175 |
if( !empty( $white_list_ips ) ) {
|
limit-login-attempts-reloaded.php
CHANGED
@@ -5,7 +5,7 @@ Description: Limit the rate of login attempts, including by way of cookies and f
|
|
5 |
Author: WPChef
|
6 |
Author URI: https://wpchef.org
|
7 |
Text Domain: limit-login-attempts-reloaded
|
8 |
-
Version: 2.7.
|
9 |
|
10 |
Copyright 2008 - 2012 Johan Eenfeldt, 2016 - 2019 WPChef
|
11 |
|
5 |
Author: WPChef
|
6 |
Author URI: https://wpchef.org
|
7 |
Text Domain: limit-login-attempts-reloaded
|
8 |
+
Version: 2.7.4
|
9 |
|
10 |
Copyright 2008 - 2012 Johan Eenfeldt, 2016 - 2019 WPChef
|
11 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: wpchefgadget
|
3 |
Tags: brute force, login, security, GDPR, protection
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 2.7.
|
7 |
|
8 |
Reloaded version of the original Limit Login Attempts plugin for Login Protection by a team of WordPress developers. GDPR compliant.
|
9 |
|
@@ -51,6 +51,9 @@ Based on the original code from Limit Login Attemps plugin by Johan Eenfeldt.
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
|
|
|
|
|
|
54 |
= 2.7.3 =
|
55 |
* Settings page is moved back to "Settings".
|
56 |
|
2 |
Contributors: wpchefgadget
|
3 |
Tags: brute force, login, security, GDPR, protection
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 5.1.1
|
6 |
+
Stable tag: 2.7.4
|
7 |
|
8 |
Reloaded version of the original Limit Login Attempts plugin for Login Protection by a team of WordPress developers. GDPR compliant.
|
9 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 2.7.4 =
|
55 |
+
* The lockout alerts can be sent to a configurable email address now.
|
56 |
+
|
57 |
= 2.7.3 =
|
58 |
* Settings page is moved back to "Settings".
|
59 |
|
views/options-page.php
CHANGED
@@ -28,6 +28,9 @@ $black_list_ips = ( is_array( $black_list_ips ) && !empty( $black_list_ips ) ) ?
|
|
28 |
|
29 |
$black_list_usernames = $this->get_option( 'blacklist_usernames' );
|
30 |
$black_list_usernames = ( is_array( $black_list_usernames ) && !empty( $black_list_usernames ) ) ? implode( "\n", $black_list_usernames ) : '';
|
|
|
|
|
|
|
31 |
?>
|
32 |
<div class="wrap limit-login-page-settings">
|
33 |
<h2><?php echo __( 'Limit Login Attempts Settings', 'limit-login-attempts-reloaded' ); ?></h2>
|
@@ -126,7 +129,10 @@ $black_list_usernames = ( is_array( $black_list_usernames ) && !empty( $black_li
|
|
126 |
<input type="checkbox" name="lockout_notify_log" <?php echo $log_checked; ?>
|
127 |
value="log"/> <?php echo __( 'Lockout log', 'limit-login-attempts-reloaded' ); ?><br/>
|
128 |
<input type="checkbox" name="lockout_notify_email" <?php echo $email_checked; ?>
|
129 |
-
value="email"/> <?php echo __( 'Email to
|
|
|
|
|
|
|
130 |
<input type="text" size="3" maxlength="4"
|
131 |
value="<?php echo( $this->get_option( 'notify_email_after' ) ); ?>"
|
132 |
name="email_after"/> <?php echo __( 'lockouts', 'limit-login-attempts-reloaded' ); ?>
|
28 |
|
29 |
$black_list_usernames = $this->get_option( 'blacklist_usernames' );
|
30 |
$black_list_usernames = ( is_array( $black_list_usernames ) && !empty( $black_list_usernames ) ) ? implode( "\n", $black_list_usernames ) : '';
|
31 |
+
|
32 |
+
$admin_notify_email = $this->get_option( 'admin_notify_email' );
|
33 |
+
$admin_email_placeholder = (!is_multisite()) ? get_option( 'admin_email' ) : get_site_option( 'admin_email' );
|
34 |
?>
|
35 |
<div class="wrap limit-login-page-settings">
|
36 |
<h2><?php echo __( 'Limit Login Attempts Settings', 'limit-login-attempts-reloaded' ); ?></h2>
|
129 |
<input type="checkbox" name="lockout_notify_log" <?php echo $log_checked; ?>
|
130 |
value="log"/> <?php echo __( 'Lockout log', 'limit-login-attempts-reloaded' ); ?><br/>
|
131 |
<input type="checkbox" name="lockout_notify_email" <?php echo $email_checked; ?>
|
132 |
+
value="email"/> <?php echo __( 'Email to', 'limit-login-attempts-reloaded' ); ?>
|
133 |
+
<input type="email" name="admin_notify_email"
|
134 |
+
value="<?php echo esc_attr( $admin_notify_email ) ?>"
|
135 |
+
placeholder="<?php echo esc_attr( $admin_email_placeholder ); ?>"/> <?php echo __( 'after', 'limit-login-attempts-reloaded' ); ?>
|
136 |
<input type="text" size="3" maxlength="4"
|
137 |
value="<?php echo( $this->get_option( 'notify_email_after' ) ); ?>"
|
138 |
name="email_after"/> <?php echo __( 'lockouts', 'limit-login-attempts-reloaded' ); ?>
|