Version Description
- Bug Fix: Fixed bug that prevented Away Mode from activating on some sites.
Download this release
Release Info
Developer | chrisjean |
Plugin | iThemes Security (formerly Better WP Security) |
Version | 6.1.1 |
Comparing to | |
See all releases |
Code changes from version 6.1.0 to 6.1.1
- better-wp-security.php +1 -1
- core/history.txt +2 -0
- core/modules/away-mode/class-itsec-away-mode.php +0 -1
- core/modules/away-mode/utilities.php +32 -32
- history.txt +2 -0
- readme.txt +6 -3
better-wp-security.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Take the guesswork out of WordPress security. iThemes Security offers 30+ ways to lock down WordPress in an easy-to-use WordPress security plugin.
|
7 |
* Author: iThemes
|
8 |
* Author URI: https://ithemes.com
|
9 |
-
* Version: 6.1.
|
10 |
* Text Domain: better-wp-security
|
11 |
* Network: True
|
12 |
* License: GPLv2
|
6 |
* Description: Take the guesswork out of WordPress security. iThemes Security offers 30+ ways to lock down WordPress in an easy-to-use WordPress security plugin.
|
7 |
* Author: iThemes
|
8 |
* Author URI: https://ithemes.com
|
9 |
+
* Version: 6.1.1
|
10 |
* Text Domain: better-wp-security
|
11 |
* Network: True
|
12 |
* License: GPLv2
|
core/history.txt
CHANGED
@@ -490,3 +490,5 @@
|
|
490 |
Enhancement: Changed log entry description of "IP Flagged as bad by iThemes IPCheck" to "IP Flagged by Network Brute Force Protection". This should help clarify the meaning of the log entry.
|
491 |
Enhancement: Improved efficiency of the Network Brute Force Protection feature.
|
492 |
Bug Fix: Fixed bug that prevented Network Brute Force Protection from working properly on some sites.
|
|
|
|
490 |
Enhancement: Changed log entry description of "IP Flagged as bad by iThemes IPCheck" to "IP Flagged by Network Brute Force Protection". This should help clarify the meaning of the log entry.
|
491 |
Enhancement: Improved efficiency of the Network Brute Force Protection feature.
|
492 |
Bug Fix: Fixed bug that prevented Network Brute Force Protection from working properly on some sites.
|
493 |
+
3.0.1 - 2017-02-09 - Chris Jean
|
494 |
+
Bug Fix: Fixed bug that prevented Away Mode from activating on some sites.
|
core/modules/away-mode/class-itsec-away-mode.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
final class ITSEC_Away_Mode {
|
4 |
|
5 |
public function run() {
|
6 |
-
return;
|
7 |
|
8 |
//Execute away mode functions on admin init
|
9 |
add_filter( 'itsec_logger_modules', array( $this, 'register_logger' ) );
|
3 |
final class ITSEC_Away_Mode {
|
4 |
|
5 |
public function run() {
|
|
|
6 |
|
7 |
//Execute away mode functions on admin init
|
8 |
add_filter( 'itsec_logger_modules', array( $this, 'register_logger' ) );
|
core/modules/away-mode/utilities.php
CHANGED
@@ -8,60 +8,60 @@ final class ITSEC_Away_Mode_Utilities {
|
|
8 |
return false;
|
9 |
}
|
10 |
}
|
11 |
-
|
12 |
public static function create_active_file() {
|
13 |
if ( self::has_active_file() ) {
|
14 |
return true;
|
15 |
}
|
16 |
-
|
17 |
$file = self::get_active_file_name();
|
18 |
-
|
19 |
$result = @file_put_contents( $file, 'true' );
|
20 |
-
|
21 |
if ( false === $result ) {
|
22 |
return false;
|
23 |
} else {
|
24 |
return true;
|
25 |
}
|
26 |
}
|
27 |
-
|
28 |
public static function delete_active_file() {
|
29 |
if ( ! self::has_active_file() ) {
|
30 |
return true;
|
31 |
}
|
32 |
-
|
33 |
$file = self::get_active_file_name();
|
34 |
-
|
35 |
return @unlink( $file );
|
36 |
}
|
37 |
-
|
38 |
public static function get_active_file_name() {
|
39 |
global $itsec_globals;
|
40 |
-
|
41 |
$file_name = apply_filters( 'itsec_filer_away_mode_active_file', ITSEC_Core::get_storage_dir() . '/itsec_away.confg' );
|
42 |
-
|
43 |
return $file_name;
|
44 |
}
|
45 |
-
|
46 |
public static function is_current_timestamp_active( $start, $end, $include_details = false ) {
|
47 |
-
$now = ITSEC_Core::
|
48 |
-
|
49 |
$active = false;
|
50 |
-
|
51 |
if ( $start <= $now && $now <= $end ) {
|
52 |
$active = true;
|
53 |
}
|
54 |
-
|
55 |
if ( ! $include_details ) {
|
56 |
return $active;
|
57 |
}
|
58 |
-
|
59 |
-
|
60 |
if ( $start > $end ) {
|
61 |
$remaining = false;
|
62 |
$next = false;
|
63 |
$length = false;
|
64 |
-
|
65 |
/* translators: 1: start timestamp, 2: end timestamp */
|
66 |
$error = new WP_Error( 'itsec-away-mode-is-current-timestamp-in-range-start-after-end', sprintf( __( 'The supplied data is invalid. The supplied start (%1$s) is after the supplied end (%2$s).', 'better-wp-security' ), $start, $end ) );
|
67 |
} else {
|
@@ -69,25 +69,25 @@ final class ITSEC_Away_Mode_Utilities {
|
|
69 |
$next = $start - $now;
|
70 |
$length = $end - $start;
|
71 |
$error = false;
|
72 |
-
|
73 |
if ( $now < $start ) {
|
74 |
$remaining = false;
|
75 |
}
|
76 |
-
|
77 |
if ( $next < 0 ) {
|
78 |
$next = false;
|
79 |
}
|
80 |
}
|
81 |
-
|
82 |
return compact( 'active', 'remaining', 'next', 'length', 'error' );
|
83 |
}
|
84 |
-
|
85 |
public static function is_current_time_active( $start, $end, $include_details = false ) {
|
86 |
$current_time = ITSEC_Core::get_current_time();
|
87 |
$now = $current_time - strtotime( date( 'Y-m-d', $current_time ) );
|
88 |
-
|
89 |
$active = false;
|
90 |
-
|
91 |
if ( $start <= $end ) {
|
92 |
if ( $start <= $now && $now <= $end ) {
|
93 |
$active = true;
|
@@ -97,31 +97,31 @@ final class ITSEC_Away_Mode_Utilities {
|
|
97 |
$active = true;
|
98 |
}
|
99 |
}
|
100 |
-
|
101 |
if ( ! $include_details ) {
|
102 |
return $active;
|
103 |
}
|
104 |
-
|
105 |
-
|
106 |
$remaining = $end - $now;
|
107 |
$next = $start - $now;
|
108 |
$length = $end - $start;
|
109 |
-
|
110 |
if ( $active && $remaining < 0 ) {
|
111 |
$remaining += DAY_IN_SECONDS;
|
112 |
} else if ( ! $active && $remaining >= 0 ) {
|
113 |
$remaining -= DAY_IN_SECONDS;
|
114 |
}
|
115 |
-
|
116 |
if ( $next < 0 ) {
|
117 |
$next += DAY_IN_SECONDS;
|
118 |
}
|
119 |
-
|
120 |
if ( $length < 0 ) {
|
121 |
$length += DAY_IN_SECONDS;
|
122 |
}
|
123 |
-
|
124 |
-
|
125 |
return compact( 'active', 'remaining', 'next', 'length' );
|
126 |
}
|
127 |
}
|
8 |
return false;
|
9 |
}
|
10 |
}
|
11 |
+
|
12 |
public static function create_active_file() {
|
13 |
if ( self::has_active_file() ) {
|
14 |
return true;
|
15 |
}
|
16 |
+
|
17 |
$file = self::get_active_file_name();
|
18 |
+
|
19 |
$result = @file_put_contents( $file, 'true' );
|
20 |
+
|
21 |
if ( false === $result ) {
|
22 |
return false;
|
23 |
} else {
|
24 |
return true;
|
25 |
}
|
26 |
}
|
27 |
+
|
28 |
public static function delete_active_file() {
|
29 |
if ( ! self::has_active_file() ) {
|
30 |
return true;
|
31 |
}
|
32 |
+
|
33 |
$file = self::get_active_file_name();
|
34 |
+
|
35 |
return @unlink( $file );
|
36 |
}
|
37 |
+
|
38 |
public static function get_active_file_name() {
|
39 |
global $itsec_globals;
|
40 |
+
|
41 |
$file_name = apply_filters( 'itsec_filer_away_mode_active_file', ITSEC_Core::get_storage_dir() . '/itsec_away.confg' );
|
42 |
+
|
43 |
return $file_name;
|
44 |
}
|
45 |
+
|
46 |
public static function is_current_timestamp_active( $start, $end, $include_details = false ) {
|
47 |
+
$now = ITSEC_Core::get_current_time_gmt();
|
48 |
+
|
49 |
$active = false;
|
50 |
+
|
51 |
if ( $start <= $now && $now <= $end ) {
|
52 |
$active = true;
|
53 |
}
|
54 |
+
|
55 |
if ( ! $include_details ) {
|
56 |
return $active;
|
57 |
}
|
58 |
+
|
59 |
+
|
60 |
if ( $start > $end ) {
|
61 |
$remaining = false;
|
62 |
$next = false;
|
63 |
$length = false;
|
64 |
+
|
65 |
/* translators: 1: start timestamp, 2: end timestamp */
|
66 |
$error = new WP_Error( 'itsec-away-mode-is-current-timestamp-in-range-start-after-end', sprintf( __( 'The supplied data is invalid. The supplied start (%1$s) is after the supplied end (%2$s).', 'better-wp-security' ), $start, $end ) );
|
67 |
} else {
|
69 |
$next = $start - $now;
|
70 |
$length = $end - $start;
|
71 |
$error = false;
|
72 |
+
|
73 |
if ( $now < $start ) {
|
74 |
$remaining = false;
|
75 |
}
|
76 |
+
|
77 |
if ( $next < 0 ) {
|
78 |
$next = false;
|
79 |
}
|
80 |
}
|
81 |
+
|
82 |
return compact( 'active', 'remaining', 'next', 'length', 'error' );
|
83 |
}
|
84 |
+
|
85 |
public static function is_current_time_active( $start, $end, $include_details = false ) {
|
86 |
$current_time = ITSEC_Core::get_current_time();
|
87 |
$now = $current_time - strtotime( date( 'Y-m-d', $current_time ) );
|
88 |
+
|
89 |
$active = false;
|
90 |
+
|
91 |
if ( $start <= $end ) {
|
92 |
if ( $start <= $now && $now <= $end ) {
|
93 |
$active = true;
|
97 |
$active = true;
|
98 |
}
|
99 |
}
|
100 |
+
|
101 |
if ( ! $include_details ) {
|
102 |
return $active;
|
103 |
}
|
104 |
+
|
105 |
+
|
106 |
$remaining = $end - $now;
|
107 |
$next = $start - $now;
|
108 |
$length = $end - $start;
|
109 |
+
|
110 |
if ( $active && $remaining < 0 ) {
|
111 |
$remaining += DAY_IN_SECONDS;
|
112 |
} else if ( ! $active && $remaining >= 0 ) {
|
113 |
$remaining -= DAY_IN_SECONDS;
|
114 |
}
|
115 |
+
|
116 |
if ( $next < 0 ) {
|
117 |
$next += DAY_IN_SECONDS;
|
118 |
}
|
119 |
+
|
120 |
if ( $length < 0 ) {
|
121 |
$length += DAY_IN_SECONDS;
|
122 |
}
|
123 |
+
|
124 |
+
|
125 |
return compact( 'active', 'remaining', 'next', 'length' );
|
126 |
}
|
127 |
}
|
history.txt
CHANGED
@@ -609,3 +609,5 @@
|
|
609 |
Enhancement: Changed log entry description of "IP Flagged as bad by iThemes IPCheck" to "IP Flagged by Network Brute Force Protection". This should help clarify the meaning of the log entry.
|
610 |
Enhancement: Improved efficiency of the Network Brute Force Protection feature.
|
611 |
Bug Fix: Fixed bug that prevented Network Brute Force Protection from working properly on some sites.
|
|
|
|
609 |
Enhancement: Changed log entry description of "IP Flagged as bad by iThemes IPCheck" to "IP Flagged by Network Brute Force Protection". This should help clarify the meaning of the log entry.
|
610 |
Enhancement: Improved efficiency of the Network Brute Force Protection feature.
|
611 |
Bug Fix: Fixed bug that prevented Network Brute Force Protection from working properly on some sites.
|
612 |
+
6.1.1 - 2017-02-09 - Chris Jean
|
613 |
+
Bug Fix: Fixed bug that prevented Away Mode from activating on some sites.
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ithemes, chrisjean, gerroald, mattdanner
|
|
3 |
Tags: security, security plugin, malware, hack, secure, block, SSL, admin, htaccess, lockdown, login, protect, protection, anti virus, attack, injection, login security, maintenance, permissions, prevention, authentication, administration, password, brute force, ban, permissions, bots, user agents, xml rpc, security log
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 4.7.2
|
6 |
-
Stable tag: 6.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -188,6 +188,9 @@ Free support may be available with the help of the community in the <a href="htt
|
|
188 |
|
189 |
== Changelog ==
|
190 |
|
|
|
|
|
|
|
191 |
= 6.1.0 =
|
192 |
* Enhancement: Added logging for failed two-factor, OAuth, and REST API authentications.
|
193 |
* Enhancement: Added logging details about the source of login failures and the type of authentication that failed.
|
@@ -1645,5 +1648,5 @@ This release is a complete rewrite from the ground up. Special thanks to Cory Mi
|
|
1645 |
|
1646 |
== Upgrade Notice ==
|
1647 |
|
1648 |
-
= 6.1.
|
1649 |
-
Version 6.1.
|
3 |
Tags: security, security plugin, malware, hack, secure, block, SSL, admin, htaccess, lockdown, login, protect, protection, anti virus, attack, injection, login security, maintenance, permissions, prevention, authentication, administration, password, brute force, ban, permissions, bots, user agents, xml rpc, security log
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 4.7.2
|
6 |
+
Stable tag: 6.1.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
188 |
|
189 |
== Changelog ==
|
190 |
|
191 |
+
= 6.1.1 =
|
192 |
+
* Bug Fix: Fixed bug that prevented Away Mode from activating on some sites.
|
193 |
+
|
194 |
= 6.1.0 =
|
195 |
* Enhancement: Added logging for failed two-factor, OAuth, and REST API authentications.
|
196 |
* Enhancement: Added logging details about the source of login failures and the type of authentication that failed.
|
1648 |
|
1649 |
== Upgrade Notice ==
|
1650 |
|
1651 |
+
= 6.1.1 =
|
1652 |
+
Version 6.1.1 fixes a bug that could prevent Away Mode from functioning. It is recommended for all users.
|