Version Description
Download this release
Release Info
Developer | bmarshall511 |
Plugin | WordPress Zero Spam |
Version | 5.4.4 |
Comparing to | |
See all releases |
Code changes from version 5.4.3 to 5.4.4
- core/class-user.php +2 -0
- core/class-utilities.php +2 -2
- modules/class-projecthoneypot.php +5 -1
- modules/class-zerospam.php +0 -2
- modules/wpforms/class-wpforms.php +3 -3
- readme.txt +13 -6
- wordpress-zero-spam.php +2 -2
core/class-user.php
CHANGED
@@ -36,6 +36,8 @@ class User {
|
|
36 |
$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
|
37 |
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED'] ) ) {
|
38 |
$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED'] ) );
|
|
|
|
|
39 |
} elseif ( ! empty( $_SERVER['HTTP_FORWARDED_FOR'] ) ) {
|
40 |
$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_FORWARDED_FOR'] ) );
|
41 |
} elseif ( ! empty( $_SERVER['HTTP_FORWARDED'] ) ) {
|
36 |
$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
|
37 |
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED'] ) ) {
|
38 |
$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED'] ) );
|
39 |
+
} elseif ( isset( $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'] ) ) {
|
40 |
+
$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_XHTTP_X_CLUSTER_CLIENT_IP_FORWARDED'] ) );
|
41 |
} elseif ( ! empty( $_SERVER['HTTP_FORWARDED_FOR'] ) ) {
|
42 |
$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_FORWARDED_FOR'] ) );
|
43 |
} elseif ( ! empty( $_SERVER['HTTP_FORWARDED'] ) ) {
|
core/class-utilities.php
CHANGED
@@ -232,11 +232,11 @@ class Utilities {
|
|
232 |
$lines = array();
|
233 |
|
234 |
if ( 'htaccess_legacy' === $settings ) {
|
235 |
-
$lines[] = 'Deny from ' . implode(
|
236 |
} elseif ( 'htaccess_modern' === $settings ) {
|
237 |
$lines[] = '<RequireAll>';
|
238 |
$lines[] = 'Require all granted';
|
239 |
-
$lines[] = 'Require not ip ' . implode(
|
240 |
$lines[] = '</RequireAll>';
|
241 |
}
|
242 |
}
|
232 |
$lines = array();
|
233 |
|
234 |
if ( 'htaccess_legacy' === $settings ) {
|
235 |
+
$lines[] = 'Deny from ' . implode( ' ', $denied_ips );
|
236 |
} elseif ( 'htaccess_modern' === $settings ) {
|
237 |
$lines[] = '<RequireAll>';
|
238 |
$lines[] = 'Require all granted';
|
239 |
+
$lines[] = 'Require not ip ' . implode( ' ', $denied_ips );
|
240 |
$lines[] = '</RequireAll>';
|
241 |
}
|
242 |
}
|
modules/class-projecthoneypot.php
CHANGED
@@ -95,12 +95,16 @@ class ProjectHoneypot {
|
|
95 |
krsort( $octets );
|
96 |
|
97 |
$reversed_ip = implode( '.', $octets );
|
|
|
|
|
|
|
|
|
98 |
|
99 |
$endpoint = $settings['project_honeypot_access_key']['value'] . '.' . $reversed_ip . '.dnsbl.httpbl.org';
|
100 |
$dns_array = dns_get_record( $endpoint, DNS_A );
|
101 |
|
102 |
if ( ! isset( $dns_array[0]['ip'] ) ) {
|
103 |
-
\ZeroSpam\Core\Utilities::log( 'Project Honeypot Error: could not
|
104 |
return false;
|
105 |
}
|
106 |
|
95 |
krsort( $octets );
|
96 |
|
97 |
$reversed_ip = implode( '.', $octets );
|
98 |
+
if ( strlen( $reversed_ip ) > 16) {
|
99 |
+
\ZeroSpam\Core\Utilities::log( 'Project Honeypot Warning: IPv6 ip addresses not supported: ' . $ip );
|
100 |
+
return false;
|
101 |
+
}
|
102 |
|
103 |
$endpoint = $settings['project_honeypot_access_key']['value'] . '.' . $reversed_ip . '.dnsbl.httpbl.org';
|
104 |
$dns_array = dns_get_record( $endpoint, DNS_A );
|
105 |
|
106 |
if ( ! isset( $dns_array[0]['ip'] ) ) {
|
107 |
+
\ZeroSpam\Core\Utilities::log( 'Project Honeypot Error: could not get DNS information for ' . $endpoint . ': ' . wp_json_encode( $dns_array ) );
|
108 |
return false;
|
109 |
}
|
110 |
|
modules/class-zerospam.php
CHANGED
@@ -358,8 +358,6 @@ class Zero_Spam {
|
|
358 |
);
|
359 |
|
360 |
$response = wp_remote_post( $endpoint, $args );
|
361 |
-
print_r($response);
|
362 |
-
die();
|
363 |
|
364 |
// Only send one email report per detection
|
365 |
break;
|
358 |
);
|
359 |
|
360 |
$response = wp_remote_post( $endpoint, $args );
|
|
|
|
|
361 |
|
362 |
// Only send one email report per detection
|
363 |
break;
|
modules/wpforms/class-wpforms.php
CHANGED
@@ -170,9 +170,9 @@ class WPForms {
|
|
170 |
// Only add scripts to the appropriate pages.
|
171 |
if ( 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'verify_wpforms' ) ) {
|
172 |
wp_enqueue_script( 'zerospam-davidwalsh' );
|
173 |
-
add_action( '
|
174 |
-
|
175 |
-
}
|
176 |
}
|
177 |
}
|
178 |
|
170 |
// Only add scripts to the appropriate pages.
|
171 |
if ( 'enabled' === \ZeroSpam\Core\Settings::get_settings( 'verify_wpforms' ) ) {
|
172 |
wp_enqueue_script( 'zerospam-davidwalsh' );
|
173 |
+
add_action( 'wp_enqueue_scripts', function() {
|
174 |
+
wp_add_inline_script('zerospam-davidwalsh', '(function($) {$(function() { $(".wpforms-form").ZeroSpamDavidWalsh(); })})(jQuery)' );
|
175 |
+
} );
|
176 |
}
|
177 |
}
|
178 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: bmarshall511
|
|
3 |
Tags: protection, firewall, security, spam, spam blocker
|
4 |
Donate link: https://www.zerospam.org/subscribe/
|
5 |
Requires at least: 5.2
|
6 |
-
Tested up to: 6.
|
7 |
-
Requires PHP: 7.
|
8 |
-
Stable tag: 5.4.
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
@@ -48,11 +48,11 @@ We have a highly-experienced team of developers to provide incredible support. A
|
|
48 |
Zero Spam allows you to integrate with other services to improve the ability to detect spam and malicious users. These services are optional and not required for Zero Spam to work. Before opting into any of these services, please review their terms of use and/or privacy policies.
|
49 |
|
50 |
* **[Zero Spam](https://www.zerospam.org/)** - Sends the visitor's IP & when available email to check the spam score. Review their [Privacy Policy](https://www.zerospam.org/privacy/) & [Terms of Use](https://www.zerospam.org/terms/).
|
51 |
-
* **[Stop Forum Spam](https://www.stopforumspam.com/)** - Sends the visitor's IP to check if they've been reported. Review their [Privacy Policy](https://www.stopforumspam.com/privacy) & [Terms of Use](https://www.stopforumspam.com/legal).
|
52 |
-
* **[Project Honeypot](https://www.projecthoneypot.org/)** - Sends the visitor's IP to check if they've been reported. Review their [Privacy Policy](https://www.projecthoneypot.org/privacy_policy.php) & [Terms of Use](https://www.projecthoneypot.org/terms_of_use.php).
|
53 |
-
* **[ipinfo.io](https://ipinfo.io/)** - Sends the visitor's IP to gather detailed geolocation information. Review their [Privacy Policy](https://ipinfo.io/privacy-policy) & [Terms of Use](https://ipinfo.io/terms-of-service).
|
54 |
* **[ipbase.com](https://ipbase.com/)** - Sends the visitor's IP to gather detailed geolocation information. Review their [Privacy Policy](https://ipbase.com/privacy-policy/) & [Terms of Use](https://www.iubenda.com/terms-and-conditions/41661719).
|
|
|
55 |
* **[ipstack](https://ipstack.com/)** - Sends the visitor's IP to gather detailed geolocation information. Review their [Privacy Policy](https://www.ideracorp.com/Legal/APILayer/PrivacyStatement) & [Terms of Use](https://ipstack.com/terms).
|
|
|
|
|
56 |
* **[Google Maps](https://developers.google.com/maps)** - Enables the ability to plot attack locations. Review their [Privacy Policy](https://www.ideracorp.com/Legal/APILayer/PrivacyStatement) & [Terms of Use](https://developers.google.com/terms/site-terms).
|
57 |
|
58 |
Optionally, you can also help improve Zero Spam by enabling sharing detection information. For more info on what's shared, see our [FAQ](https://github.com/Highfivery/zero-spam-for-wordpress/wiki/FAQ)
|
@@ -107,6 +107,13 @@ If hosting with Pantheon, see their [known issues page](https://pantheon.io/docs
|
|
107 |
|
108 |
== Changelog ==
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
= v5.4.3 =
|
111 |
|
112 |
* fix(emojis): fix for fatal error when emojis are disabled
|
3 |
Tags: protection, firewall, security, spam, spam blocker
|
4 |
Donate link: https://www.zerospam.org/subscribe/
|
5 |
Requires at least: 5.2
|
6 |
+
Tested up to: 6.1.1
|
7 |
+
Requires PHP: 7.4
|
8 |
+
Stable tag: 5.4.4
|
9 |
License: GNU GPLv3
|
10 |
License URI: https://choosealicense.com/licenses/gpl-3.0/
|
11 |
|
48 |
Zero Spam allows you to integrate with other services to improve the ability to detect spam and malicious users. These services are optional and not required for Zero Spam to work. Before opting into any of these services, please review their terms of use and/or privacy policies.
|
49 |
|
50 |
* **[Zero Spam](https://www.zerospam.org/)** - Sends the visitor's IP & when available email to check the spam score. Review their [Privacy Policy](https://www.zerospam.org/privacy/) & [Terms of Use](https://www.zerospam.org/terms/).
|
|
|
|
|
|
|
51 |
* **[ipbase.com](https://ipbase.com/)** - Sends the visitor's IP to gather detailed geolocation information. Review their [Privacy Policy](https://ipbase.com/privacy-policy/) & [Terms of Use](https://www.iubenda.com/terms-and-conditions/41661719).
|
52 |
+
* **[ipinfo.io](https://ipinfo.io/)** - Sends the visitor's IP to gather detailed geolocation information. Review their [Privacy Policy](https://ipinfo.io/privacy-policy) & [Terms of Use](https://ipinfo.io/terms-of-service).
|
53 |
* **[ipstack](https://ipstack.com/)** - Sends the visitor's IP to gather detailed geolocation information. Review their [Privacy Policy](https://www.ideracorp.com/Legal/APILayer/PrivacyStatement) & [Terms of Use](https://ipstack.com/terms).
|
54 |
+
* **[Stop Forum Spam](https://www.stopforumspam.com/)** - Sends the visitor's IP to check if they've been reported. Review their [Privacy Policy](https://www.stopforumspam.com/privacy) & [Terms of Use](https://www.stopforumspam.com/legal).
|
55 |
+
* **[Project Honeypot](https://www.projecthoneypot.org/)** - Sends the visitor's IP to check if they've been reported. Review their [Privacy Policy](https://www.projecthoneypot.org/privacy_policy.php) & [Terms of Use](https://www.projecthoneypot.org/terms_of_use.php).
|
56 |
* **[Google Maps](https://developers.google.com/maps)** - Enables the ability to plot attack locations. Review their [Privacy Policy](https://www.ideracorp.com/Legal/APILayer/PrivacyStatement) & [Terms of Use](https://developers.google.com/terms/site-terms).
|
57 |
|
58 |
Optionally, you can also help improve Zero Spam by enabling sharing detection information. For more info on what's shared, see our [FAQ](https://github.com/Highfivery/zero-spam-for-wordpress/wiki/FAQ)
|
107 |
|
108 |
== Changelog ==
|
109 |
|
110 |
+
= v5.4.4 =
|
111 |
+
|
112 |
+
* refactor(project honeypot): resolves #344, added additional check & debug info for ip type support
|
113 |
+
* fix(wpforms): resolves #343, fix for jquery dependency
|
114 |
+
* fix(registration): resolves #342, fix for failed registration output
|
115 |
+
* fix(php8): resolves #341, fix for php8+ compatibility issue
|
116 |
+
|
117 |
= v5.4.3 =
|
118 |
|
119 |
* fix(emojis): fix for fatal error when emojis are disabled
|
wordpress-zero-spam.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* Plugin Name: Zero Spam for WordPress
|
14 |
* Plugin URI: https://www.highfivery.com/projects/zero-spam/
|
15 |
* Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam & malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong>
|
16 |
-
* Version: 5.4.
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.3
|
19 |
* Author: Highfivery LLC
|
@@ -31,7 +31,7 @@ defined( 'ABSPATH' ) || die();
|
|
31 |
define( 'ZEROSPAM', __FILE__ );
|
32 |
define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) );
|
33 |
define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) );
|
34 |
-
define( 'ZEROSPAM_VERSION', '5.4.
|
35 |
|
36 |
if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
|
37 |
define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );
|
13 |
* Plugin Name: Zero Spam for WordPress
|
14 |
* Plugin URI: https://www.highfivery.com/projects/zero-spam/
|
15 |
* Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam & malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong>
|
16 |
+
* Version: 5.4.4
|
17 |
* Requires at least: 5.2
|
18 |
* Requires PHP: 7.3
|
19 |
* Author: Highfivery LLC
|
31 |
define( 'ZEROSPAM', __FILE__ );
|
32 |
define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) );
|
33 |
define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) );
|
34 |
+
define( 'ZEROSPAM_VERSION', '5.4.4' );
|
35 |
|
36 |
if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
|
37 |
define( 'ZEROSPAM_URL', ZEROSPAM_DEVELOPMENT_URL );
|