PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/model/setting/class-notfound-lockout.php +11 -4 5.3.1 → 6.3.0 View file →
@@ -26,9 +26,9 @@
26 26 *
27 27 * @var bool
28 28 * @defender_property
29 29 */
30 - public $enabled = false;
30 + public bool $enabled = false;
31 31
32 32 /**
33 33 * How many 404 error happen before we lock out the IP.
34 34 *
@@ -130,12 +130,12 @@
130 130 */
131 131 public function get_default_values(): array {
132 132 return array(
133 133 'message' => esc_html__(
134 - 'You have been locked out due to too many attempts to access a file that doesn`t exist.',
134 + 'You have been locked out due to too many 404 requests.',
135 135 'defender-security'
136 136 ),
137 - 'whitelist' => ".css\n.js\n.map",
137 + 'whitelist' => ".css\n.js\n.map\n/cdn-cgi/challenge-platform/",
138 138 );
139 139 }
140 140
141 141 /**
@@ -158,9 +158,16 @@
158 158 * @return array
159 159 */
160 160 public function get_lockout_list( $type = 'blocklist' ): array {
161 161 $data = ( 'blocklist' === $type ) ? $this->blacklist : $this->whitelist;
162 - $arr = is_array( $data ) ? $data : array_filter( explode( PHP_EOL, $data ) );
162 + $arr = is_array( $data )
163 + ? $data
164 + : array_filter(
165 + explode( PHP_EOL, $data ),
166 + function ( $line ) {
167 + return strlen( trim( $line ) ) > 0;
168 + }
169 + );
163 170 $arr = array_map( 'trim', $arr );
164 171 $arr = array_map( 'strtolower', $arr );
165 172
166 173 return $arr;