WP fail2ban - Version 2.3.1

Version Description

Download this release

Release Info

Developer invisnet
Plugin Icon 128x128 WP fail2ban
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3.0 to 2.3.1

Files changed (2) hide show
  1. readme.txt +1 -8
  2. wp-fail2ban.php +28 -25
readme.txt CHANGED
@@ -35,6 +35,7 @@ Requires PHP 5.3 or later.
35
 
36
  `[wordpress]`
37
  `enabled = true`
 
38
  `filter = wordpress`
39
  `logpath = /var/log/auth.log`
40
 
@@ -96,14 +97,6 @@ will block any attempt to log in as `admin` before most of the core WordPress co
96
 
97
  *WPf2b* doesn't do anything to the regex other than make it case-insensitive.
98
 
99
- = Why is fail2ban complaining on my flavour of Linux? =
100
-
101
- Depending on your `fail2ban` configuration, you may need to add a line like:
102
-
103
- port = http,https
104
-
105
- to the `[wordpress]` section in `jail.local`.
106
-
107
  == Changelog ==
108
 
109
  = 2.3.0 =
35
 
36
  `[wordpress]`
37
  `enabled = true`
38
+ `port = http,https`
39
  `filter = wordpress`
40
  `logpath = /var/log/auth.log`
41
 
97
 
98
  *WPf2b* doesn't do anything to the regex other than make it case-insensitive.
99
 
 
 
 
 
 
 
 
 
100
  == Changelog ==
101
 
102
  = 2.3.0 =
wp-fail2ban.php CHANGED
@@ -1,31 +1,34 @@
1
  <?php
2
- /*
3
- Plugin Name: WP fail2ban
4
- Plugin URI: https://charles.lecklider.org/wordpress/wp-fail2ban/
5
- Description: Write all login attempts to syslog for integration with fail2ban.
6
- Version: 2.3.0
7
- Author: Charles Lecklider
8
- Author URI: https://charles.lecklider.org/
9
- License: GPL2
10
- */
 
11
 
12
- /* Copyright 2012-14 Charles Lecklider (email : wordpress@charles.lecklider.org)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- This program is free software; you can redistribute it and/or modify
15
- it under the terms of the GNU General Public License, version 2, as
16
- published by the Free Software Foundation.
17
 
18
- This program is distributed in the hope that it will be useful,
19
- but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- GNU General Public License for more details.
22
-
23
- You should have received a copy of the GNU General Public License
24
- along with this program; if not, write to the Free Software
25
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
- */
27
-
28
- namespace org\lecklider\charles\wp_fail2ban;
29
 
30
  function openlog($log = LOG_AUTH, $custom_log = 'WP_FAIL2BAN_AUTH_LOG')
31
  {
@@ -68,7 +71,7 @@ function remote_addr()
68
  }
69
 
70
  if (defined('WP_FAIL2BAN_BLOCKED_USERS')) {
71
- add_action( 'authenticate',
72
  function($user, $username, $password)
73
  {
74
  if (!empty($username) && preg_match('/'.WP_FAIL2BAN_BLOCKED_USERS.'/i', $username)) {
1
  <?php
2
+ /**
3
+ * Plugin Name: WP fail2ban
4
+ * Plugin URI: https://charles.lecklider.org/wordpress/wp-fail2ban/
5
+ * Description: Write all login attempts to syslog for integration with fail2ban.
6
+ * Version: 2.3.1
7
+ * Author: Charles Lecklider
8
+ * Author URI: https://charles.lecklider.org/
9
+ * License: GPL2
10
+ * SPDX-License-Identifier: GPL-2.0
11
+ */
12
 
13
+ /**
14
+ * Copyright 2012-15 Charles Lecklider (email : wordpress@charles.lecklider.org)
15
+ *
16
+ * This program is free software; you can redistribute it and/or modify
17
+ * it under the terms of the GNU General Public License, version 2, as
18
+ * published by the Free Software Foundation.
19
+ *
20
+ * This program is distributed in the hope that it will be useful,
21
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ * GNU General Public License for more details.
24
+ *
25
+ * You should have received a copy of the GNU General Public License
26
+ * along with this program; if not, write to the Free Software
27
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
+ */
29
 
30
+ namespace org\lecklider\charles\wordpress\wp_fail2ban;
 
 
31
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  function openlog($log = LOG_AUTH, $custom_log = 'WP_FAIL2BAN_AUTH_LOG')
34
  {
71
  }
72
 
73
  if (defined('WP_FAIL2BAN_BLOCKED_USERS')) {
74
+ add_filter( 'authenticate',
75
  function($user, $username, $password)
76
  {
77
  if (!empty($username) && preg_match('/'.WP_FAIL2BAN_BLOCKED_USERS.'/i', $username)) {