Version Description
Download this release
Release Info
Developer | pluginkollektiv |
Plugin | Antispam Bee |
Version | 2.11.0 |
Comparing to | |
See all releases |
Code changes from version 2.10.0 to 2.11.0
- CHANGELOG.md +15 -0
- antispam_bee.php +13 -8
- behat.yml +0 -47
- css/styles.css +1 -1
- docker_tag +0 -1
- output.log +0 -66
- readme.txt +16 -5
CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1 |
## Changelog ##
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
### 2.10.0 ###
|
4 |
* **English**
|
5 |
* Fix: Switch from ip2country.info to iplocate.io for country check
|
1 |
## Changelog ##
|
2 |
|
3 |
+
### 2.11.0 ###
|
4 |
+
* **English**
|
5 |
+
* Fix: Allow empty comments if `allow_empty_comment` is set to true
|
6 |
+
* Fix: Add `aria-label` to work around bug in a11y testing tools
|
7 |
+
* Fix: Change priority for `comment_form_field_comment` from 10 to 99
|
8 |
+
* Tweak: Updated some FAQ entries
|
9 |
+
* Tweak: Updated build tooling
|
10 |
+
|
11 |
+
* **Deutsch**
|
12 |
+
* Fix: Leere Kommentare erlauben, wenn der Filter `allow_empty_comment` gesetzt ist
|
13 |
+
* Fix: Ein `aria-label` hinzugefügt, um einen bekannten Fehler bei Tests zu umgehen
|
14 |
+
* Fix: Änderung der Priorität vom Filter `comment_form_field_comment` von 10 auf 99
|
15 |
+
* Tweak: Aktualisierungen in der FAQ
|
16 |
+
* Tweak: Optimierungen am Build-Prozess
|
17 |
+
|
18 |
### 2.10.0 ###
|
19 |
* **English**
|
20 |
* Fix: Switch from ip2country.info to iplocate.io for country check
|
antispam_bee.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* Domain Path: /lang
|
10 |
* License: GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
-
* Version: 2.
|
13 |
*
|
14 |
* @package Antispam Bee
|
15 |
**/
|
@@ -92,6 +92,7 @@ class Antispam_Bee {
|
|
92 |
* @since 0.1
|
93 |
* @since 2.6.4
|
94 |
* @since 2.10.0 Change handling of comment field honeypot and call functions after completed upgrades
|
|
|
95 |
*/
|
96 |
public static function init() {
|
97 |
add_action(
|
@@ -335,7 +336,8 @@ class Antispam_Bee {
|
|
335 |
array(
|
336 |
__CLASS__,
|
337 |
'prepare_comment_field',
|
338 |
-
)
|
|
|
339 |
);
|
340 |
}
|
341 |
|
@@ -1117,11 +1119,11 @@ class Antispam_Bee {
|
|
1117 |
$hidden_field = self::get_key( $_POST, 'comment' );
|
1118 |
$plugin_field = self::get_key( $_POST, self::get_secret_name_for_post( $post_id ) );
|
1119 |
|
1120 |
-
if (
|
|
|
|
|
1121 |
$_POST['comment'] = $plugin_field;
|
1122 |
unset( $_POST[ self::get_secret_name_for_post( $post_id ) ] );
|
1123 |
-
} else {
|
1124 |
-
$_POST['ab_spam__hidden_field'] = 1;
|
1125 |
}
|
1126 |
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
1127 |
}
|
@@ -1278,7 +1280,7 @@ class Antispam_Bee {
|
|
1278 |
$output .= $matches['between1'] . $matches['between2'] . $matches['between3'];
|
1279 |
$output .= $matches['after'] . '>';
|
1280 |
$output .= $matches['content'];
|
1281 |
-
$output .= '</textarea><textarea id="comment" aria-hidden="true" name="comment" autocomplete="new-password" style="padding:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;position:absolute !important;white-space:nowrap !important;height:1px !important;width:1px !important;overflow:hidden !important;" tabindex="-1"></textarea>';
|
1282 |
|
1283 |
$output .= $id_script;
|
1284 |
$output .= $init_time_field;
|
@@ -1425,7 +1427,10 @@ class Antispam_Bee {
|
|
1425 |
$author = self::get_key( $comment, 'comment_author' );
|
1426 |
$useragent = self::get_key( $comment, 'comment_agent' );
|
1427 |
|
1428 |
-
|
|
|
|
|
|
|
1429 |
return array(
|
1430 |
'reason' => 'empty',
|
1431 |
);
|
@@ -2245,7 +2250,7 @@ class Antispam_Bee {
|
|
2245 |
if ( function_exists( 'filter_var' ) ) {
|
2246 |
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) !== false;
|
2247 |
} else {
|
2248 |
-
return preg_match( '/^\d{1,3}(\.\d{1,3}){3
|
2249 |
}
|
2250 |
}
|
2251 |
|
9 |
* Domain Path: /lang
|
10 |
* License: GPLv2 or later
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
+
* Version: 2.11.0
|
13 |
*
|
14 |
* @package Antispam Bee
|
15 |
**/
|
92 |
* @since 0.1
|
93 |
* @since 2.6.4
|
94 |
* @since 2.10.0 Change handling of comment field honeypot and call functions after completed upgrades
|
95 |
+
* @since 2.11.0 Change priority from default 10 to 99 for comment_form_field_comment
|
96 |
*/
|
97 |
public static function init() {
|
98 |
add_action(
|
336 |
array(
|
337 |
__CLASS__,
|
338 |
'prepare_comment_field',
|
339 |
+
),
|
340 |
+
99
|
341 |
);
|
342 |
}
|
343 |
|
1119 |
$hidden_field = self::get_key( $_POST, 'comment' );
|
1120 |
$plugin_field = self::get_key( $_POST, self::get_secret_name_for_post( $post_id ) );
|
1121 |
|
1122 |
+
if ( ! empty( $hidden_field ) ) {
|
1123 |
+
$_POST['ab_spam__hidden_field'] = 1;
|
1124 |
+
} else {
|
1125 |
$_POST['comment'] = $plugin_field;
|
1126 |
unset( $_POST[ self::get_secret_name_for_post( $post_id ) ] );
|
|
|
|
|
1127 |
}
|
1128 |
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
1129 |
}
|
1280 |
$output .= $matches['between1'] . $matches['between2'] . $matches['between3'];
|
1281 |
$output .= $matches['after'] . '>';
|
1282 |
$output .= $matches['content'];
|
1283 |
+
$output .= '</textarea><textarea id="comment" aria-label="hp-comment" aria-hidden="true" name="comment" autocomplete="new-password" style="padding:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;position:absolute !important;white-space:nowrap !important;height:1px !important;width:1px !important;overflow:hidden !important;" tabindex="-1"></textarea>';
|
1284 |
|
1285 |
$output .= $id_script;
|
1286 |
$output .= $init_time_field;
|
1427 |
$author = self::get_key( $comment, 'comment_author' );
|
1428 |
$useragent = self::get_key( $comment, 'comment_agent' );
|
1429 |
|
1430 |
+
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
|
1431 |
+
$allow_empty_comment = apply_filters( 'allow_empty_comment', false, $comment );
|
1432 |
+
|
1433 |
+
if ( empty( $body ) && ! $allow_empty_comment ) {
|
1434 |
return array(
|
1435 |
'reason' => 'empty',
|
1436 |
);
|
2250 |
if ( function_exists( 'filter_var' ) ) {
|
2251 |
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) !== false;
|
2252 |
} else {
|
2253 |
+
return preg_match( '/^\d{1,3}(\.\d{1,3}){3}$/', $ip );
|
2254 |
}
|
2255 |
}
|
2256 |
|
behat.yml
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
default:
|
2 |
-
autoload:
|
3 |
-
'': tests/Acceptance/Behat/bootstrap
|
4 |
-
suites:
|
5 |
-
default:
|
6 |
-
paths:
|
7 |
-
features: tests/Acceptance/Behat
|
8 |
-
contexts:
|
9 |
-
# Keep WordpressContext first!
|
10 |
-
- PaulGibbs\WordpressBehatExtension\Context\WordpressContext
|
11 |
-
- FeatureContext
|
12 |
-
- CommentContext
|
13 |
-
- TrackbackContext
|
14 |
-
- PluginContext
|
15 |
-
- Behat\MinkExtension\Context\MinkContext
|
16 |
-
- PaulGibbs\WordpressBehatExtension\Context\ContentContext
|
17 |
-
- PaulGibbs\WordpressBehatExtension\Context\DashboardContext
|
18 |
-
- PaulGibbs\WordpressBehatExtension\Context\UserContext
|
19 |
-
- PaulGibbs\WordpressBehatExtension\Context\EditPostContext
|
20 |
-
extensions:
|
21 |
-
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
|
22 |
-
Behat\MinkExtension:
|
23 |
-
base_url: http://localhost:8080 # [!] Change this for your local development.
|
24 |
-
browser_name: chrome
|
25 |
-
default_session: headless
|
26 |
-
javascript_session: javascript
|
27 |
-
sessions:
|
28 |
-
headless:
|
29 |
-
goutte:
|
30 |
-
guzzle_parameters:
|
31 |
-
verify: false
|
32 |
-
javascript:
|
33 |
-
chrome:
|
34 |
-
api_url: http://localhost:9222
|
35 |
-
validate_certificate: false
|
36 |
-
|
37 |
-
PaulGibbs\WordpressBehatExtension:
|
38 |
-
path: %paths.base%/tmp/antispam-bee/ # [!] Change this for your local development.
|
39 |
-
default_driver: wpcli
|
40 |
-
wpcli:
|
41 |
-
binary: %paths.base%/vendor/bin/wp
|
42 |
-
database:
|
43 |
-
restore_after_test: true
|
44 |
-
users:
|
45 |
-
admin:
|
46 |
-
username: admin
|
47 |
-
password: abc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/styles.css
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
.ab-wrap {
|
20 |
margin: 0 0 0 -10px;
|
21 |
padding: 20px 0 0 0;
|
22 |
-
text-rendering: optimizeLegibility;
|
23 |
}
|
24 |
|
25 |
.ab-column {
|
19 |
.ab-wrap {
|
20 |
margin: 0 0 0 -10px;
|
21 |
padding: 20px 0 0 0;
|
22 |
+
text-rendering: optimizeLegibility; /* stylelint-disable-line value-keyword-case */
|
23 |
}
|
24 |
|
25 |
.ab-column {
|
docker_tag
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
docker.pkg.github.com/pluginkollektiv/antispam-bee/php-actions_composer_antispam-bee:php-latest-build2
|
|
output.log
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
Running php-build composer
|
2 |
-
WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json.
|
3 |
-
Configure a credential helper to remove this warning. See
|
4 |
-
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
|
5 |
-
|
6 |
-
Login Succeeded
|
7 |
-
Pulling docker.pkg.github.com/pluginkollektiv/antispam-bee/php-actions_composer_antispam-bee:php-latest-build2
|
8 |
-
WARNING: ⚠️ Failed to pull manifest by the resolved digest. This registry does not
|
9 |
-
appear to conform to the distribution registry specification; falling back to
|
10 |
-
pull by tag. This fallback is DEPRECATED, and will be removed in a future
|
11 |
-
release. Please contact admins of https://docker.pkg.github.com. ⚠️
|
12 |
-
|
13 |
-
php-latest-build2: Pulling from pluginkollektiv/antispam-bee/php-actions_composer_antispam-bee
|
14 |
-
9aae54b2144e: Pulling fs layer
|
15 |
-
0552190813ec: Pulling fs layer
|
16 |
-
d6abf49ad7ff: Pulling fs layer
|
17 |
-
4a7b791901cf: Pulling fs layer
|
18 |
-
483f3f97a5bc: Pulling fs layer
|
19 |
-
e078e9d6b760: Pulling fs layer
|
20 |
-
2c134042be40: Pulling fs layer
|
21 |
-
db5fecf1aa2d: Pulling fs layer
|
22 |
-
f28c38a75bec: Pulling fs layer
|
23 |
-
159f106d1fc1: Pulling fs layer
|
24 |
-
4a7b791901cf: Waiting
|
25 |
-
483f3f97a5bc: Waiting
|
26 |
-
e078e9d6b760: Waiting
|
27 |
-
2c134042be40: Waiting
|
28 |
-
db5fecf1aa2d: Waiting
|
29 |
-
f28c38a75bec: Waiting
|
30 |
-
159f106d1fc1: Waiting
|
31 |
-
d6abf49ad7ff: Verifying Checksum
|
32 |
-
d6abf49ad7ff: Download complete
|
33 |
-
0552190813ec: Verifying Checksum
|
34 |
-
0552190813ec: Download complete
|
35 |
-
4a7b791901cf: Verifying Checksum
|
36 |
-
4a7b791901cf: Download complete
|
37 |
-
9aae54b2144e: Verifying Checksum
|
38 |
-
9aae54b2144e: Download complete
|
39 |
-
e078e9d6b760: Verifying Checksum
|
40 |
-
e078e9d6b760: Download complete
|
41 |
-
9aae54b2144e: Pull complete
|
42 |
-
0552190813ec: Pull complete
|
43 |
-
d6abf49ad7ff: Pull complete
|
44 |
-
4a7b791901cf: Pull complete
|
45 |
-
483f3f97a5bc: Verifying Checksum
|
46 |
-
483f3f97a5bc: Download complete
|
47 |
-
483f3f97a5bc: Pull complete
|
48 |
-
e078e9d6b760: Pull complete
|
49 |
-
f28c38a75bec: Verifying Checksum
|
50 |
-
f28c38a75bec: Download complete
|
51 |
-
2c134042be40: Verifying Checksum
|
52 |
-
2c134042be40: Download complete
|
53 |
-
db5fecf1aa2d: Verifying Checksum
|
54 |
-
db5fecf1aa2d: Download complete
|
55 |
-
159f106d1fc1: Verifying Checksum
|
56 |
-
159f106d1fc1: Download complete
|
57 |
-
2c134042be40: Pull complete
|
58 |
-
db5fecf1aa2d: Pull complete
|
59 |
-
f28c38a75bec: Pull complete
|
60 |
-
159f106d1fc1: Pull complete
|
61 |
-
Digest: sha256:a6b0df3c018b4a3bb89e86996e4f4f3b15381d959d9985a1074cb62e916119df
|
62 |
-
Status: Downloaded newer image for docker.pkg.github.com/pluginkollektiv/antispam-bee/php-actions_composer_antispam-bee:php-latest-build2
|
63 |
-
docker.pkg.github.com/pluginkollektiv/antispam-bee/php-actions_composer_antispam-bee:php-latest-build2
|
64 |
-
Docker tag: docker.pkg.github.com/pluginkollektiv/antispam-bee/php-actions_composer_antispam-bee:php-latest-build2
|
65 |
-
No private keys supplied
|
66 |
-
Command: composer install --no-progress --no-interaction --ignore-platform-reqs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
* Tags: anti-spam, antispam, block spam, comment, comments, comment spam, pingback, spam, spam filter, trackback, GDPR
|
4 |
* Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
|
5 |
* Requires at least: 4.5
|
6 |
-
* Tested up to: 5.
|
7 |
* Requires PHP: 5.2
|
8 |
-
* Stable tag: 2.
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -62,9 +62,13 @@ After you have activated *Antispam Bee* the plugin will block spam comments out
|
|
62 |
### Does Antispam Bee prevents spam registrations or protects form plugins? ###
|
63 |
Antispam Bee works best with default WordPress comments. It does not help to protect form plugins and does not prevent spam registrations. Hopefully we can provide better hooks for third party plugins to use Antispam Bee to fill this gap in the forthcoming new major version.
|
64 |
|
65 |
-
### Does Antispam Bee work with Jetpack, Disqus Comments and
|
66 |
-
Antispam Bee works best with default WordPress comments. It is not compatible with Jetpack or Disqus Comments as those plugins load
|
67 |
-
|
|
|
|
|
|
|
|
|
68 |
|
69 |
### Does Antispam Bee store any private user data, and is it compliant with GDPR? ###
|
70 |
Antispam Bee is developed in Europe. You might have heard we can be a bit nitpicky over here when it comes to privacy. The plugin does not save private user data and is 100% compliant with GDPR.
|
@@ -92,6 +96,13 @@ A complete documentation is available on [pluginkollektiv.org](https://antispamb
|
|
92 |
|
93 |
## Changelog ##
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
### 2.10.0 ###
|
96 |
* Fix: Switch from ip2country.info to iplocate.io for country check
|
97 |
* Enhancement: Use filter to add the honeypot field instead of output buffering for new installations and added option to switch between the both ways
|
3 |
* Tags: anti-spam, antispam, block spam, comment, comments, comment spam, pingback, spam, spam filter, trackback, GDPR
|
4 |
* Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
|
5 |
* Requires at least: 4.5
|
6 |
+
* Tested up to: 5.9
|
7 |
* Requires PHP: 5.2
|
8 |
+
* Stable tag: 2.11.0
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
62 |
### Does Antispam Bee prevents spam registrations or protects form plugins? ###
|
63 |
Antispam Bee works best with default WordPress comments. It does not help to protect form plugins and does not prevent spam registrations. Hopefully we can provide better hooks for third party plugins to use Antispam Bee to fill this gap in the forthcoming new major version.
|
64 |
|
65 |
+
### Does Antispam Bee work with Jetpack, wpDiscuz, Disqus Comments and similar comment plugins?
|
66 |
+
Antispam Bee works best with default WordPress comments. It is not compatible with Jetpack, wpDiscuz or Disqus Comments as those plugins load a new comment form within an iframe. Thus Antispam Bee can not access the comment form directly.
|
67 |
+
|
68 |
+
### Does Antispam Bee work with AJAX comment plugins or similar theme features?
|
69 |
+
Whether Antispam Bee works with a comment form submitted via AJAX depends on how the AJAX request is made. If the request goes to the file that usually also receives the comments, Antispam Bee could work with it out of the box (the [WP Ajaxify Comments](https://wordpress.org/plugins/wp-ajaxify-comments/) plugin does this, for example).
|
70 |
+
|
71 |
+
If the comments are sent to the `admin-ajax.php`, the `antispam_bee_disallow_ajax_calls` filter must be used to run ASB for requests to that file as well. If the script does not send all form data to the file, but only some selected ones, further customization is probably necessary, as [exemplified in this post by Torsten Landsiedel](https://torstenlandsiedel.de/2020/10/04/ajaxifizierte-kommentare-und-antispam-bee/) (in German).
|
72 |
|
73 |
### Does Antispam Bee store any private user data, and is it compliant with GDPR? ###
|
74 |
Antispam Bee is developed in Europe. You might have heard we can be a bit nitpicky over here when it comes to privacy. The plugin does not save private user data and is 100% compliant with GDPR.
|
96 |
|
97 |
## Changelog ##
|
98 |
|
99 |
+
### 2.11.0 ###
|
100 |
+
* Fix: Allow empty comments if `allow_empty_comment` is set to true
|
101 |
+
* Fix: Add `aria-label` to work around bug in a11y testing tools
|
102 |
+
* Fix: Change priority for `comment_form_field_comment` from 10 to 99
|
103 |
+
* Tweak: Updated some FAQ entries
|
104 |
+
* Tweak: Updated build tooling
|
105 |
+
|
106 |
### 2.10.0 ###
|
107 |
* Fix: Switch from ip2country.info to iplocate.io for country check
|
108 |
* Enhancement: Use filter to add the honeypot field instead of output buffering for new installations and added option to switch between the both ways
|