Version Description
Release Date - 1 April 2016
- Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
- Fixed a bug that could have resulted in comments that were caught by the core WordPress comment blacklist not to have a corresponding History entry.
- Fixed a bug that could have caused avoidable PHP warnings in the error log.
Download this release
Release Info
| Developer | cfinke |
| Plugin | |
| Version | 3.1.10 |
| Comparing to | |
| See all releases | |
Code changes from version 3.1.9 to 3.1.10
- akismet.php +2 -2
- class.akismet.php +10 -3
- readme.txt +9 -2
akismet.php
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
Plugin Name: Akismet
|
| 7 |
Plugin URI: http://akismet.com/
|
| 8 |
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/">Sign up for an Akismet plan</a> to get an API key, and 3) Go to your Akismet configuration page, and save your API key.
|
| 9 |
-
Version: 3.1.
|
| 10 |
Author: Automattic
|
| 11 |
Author URI: http://automattic.com/wordpress-plugins/
|
| 12 |
License: GPLv2 or later
|
|
@@ -37,7 +37,7 @@ if ( !function_exists( 'add_action' ) ) {
|
|
| 37 |
exit;
|
| 38 |
}
|
| 39 |
|
| 40 |
-
define( 'AKISMET_VERSION', '3.1.
|
| 41 |
define( 'AKISMET__MINIMUM_WP_VERSION', '3.2' );
|
| 42 |
define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
| 43 |
define( 'AKISMET_DELETE_LIMIT', 100000 );
|
| 6 |
Plugin Name: Akismet
|
| 7 |
Plugin URI: http://akismet.com/
|
| 8 |
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/">Sign up for an Akismet plan</a> to get an API key, and 3) Go to your Akismet configuration page, and save your API key.
|
| 9 |
+
Version: 3.1.10
|
| 10 |
Author: Automattic
|
| 11 |
Author URI: http://automattic.com/wordpress-plugins/
|
| 12 |
License: GPLv2 or later
|
| 37 |
exit;
|
| 38 |
}
|
| 39 |
|
| 40 |
+
define( 'AKISMET_VERSION', '3.1.10' );
|
| 41 |
define( 'AKISMET__MINIMUM_WP_VERSION', '3.2' );
|
| 42 |
define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
| 43 |
define( 'AKISMET_DELETE_LIMIT', 100000 );
|
class.akismet.php
CHANGED
|
@@ -105,7 +105,7 @@ class Akismet {
|
|
| 105 |
* @param mixed $old_value The old option value.
|
| 106 |
* @param mixed $value The new option value.
|
| 107 |
*/
|
| 108 |
-
function updated_option( $old_value, $value ) {
|
| 109 |
// Not an API call
|
| 110 |
if ( ! class_exists( 'WPCOM_JSON_API_Update_Option_Endpoint' ) ) {
|
| 111 |
return;
|
|
@@ -289,7 +289,9 @@ class Akismet {
|
|
| 289 |
elseif ( self::$last_comment['akismet_result'] == 'false' ) {
|
| 290 |
update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' );
|
| 291 |
self::update_comment_history( $comment->comment_ID, '', 'check-ham' );
|
| 292 |
-
|
|
|
|
|
|
|
| 293 |
if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) )
|
| 294 |
self::update_comment_history( $comment->comment_ID, '', 'wp-blacklisted' );
|
| 295 |
else
|
|
@@ -748,7 +750,7 @@ class Akismet {
|
|
| 748 |
$comment1 = (array) $comment1;
|
| 749 |
$comment2 = (array) $comment2;
|
| 750 |
|
| 751 |
-
|
| 752 |
isset( $comment1['comment_post_ID'], $comment2['comment_post_ID'] )
|
| 753 |
&& intval( $comment1['comment_post_ID'] ) == intval( $comment2['comment_post_ID'] )
|
| 754 |
&& (
|
|
@@ -760,6 +762,9 @@ class Akismet {
|
|
| 760 |
substr( $comment1['comment_author'], 0, 248 ) == substr( $comment2['comment_author'], 0, 248 )
|
| 761 |
|| substr( stripslashes( $comment1['comment_author'] ), 0, 248 ) == substr( $comment2['comment_author'], 0, 248 )
|
| 762 |
|| substr( $comment1['comment_author'], 0, 248 ) == substr( stripslashes( $comment2['comment_author'] ), 0, 248 )
|
|
|
|
|
|
|
|
|
|
| 763 |
)
|
| 764 |
&& (
|
| 765 |
// The email max length is 100 characters, limited by the VARCHAR(100) column type.
|
|
@@ -772,6 +777,8 @@ class Akismet {
|
|
| 772 |
|| ( ! $comment2['comment_author_email'] && strlen( $comment1['comment_author_email'] ) > 100 )
|
| 773 |
)
|
| 774 |
);
|
|
|
|
|
|
|
| 775 |
}
|
| 776 |
|
| 777 |
// Does the supplied comment match the details of the one most recently stored in self::$last_comment?
|
| 105 |
* @param mixed $old_value The old option value.
|
| 106 |
* @param mixed $value The new option value.
|
| 107 |
*/
|
| 108 |
+
public static function updated_option( $old_value, $value ) {
|
| 109 |
// Not an API call
|
| 110 |
if ( ! class_exists( 'WPCOM_JSON_API_Update_Option_Endpoint' ) ) {
|
| 111 |
return;
|
| 289 |
elseif ( self::$last_comment['akismet_result'] == 'false' ) {
|
| 290 |
update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' );
|
| 291 |
self::update_comment_history( $comment->comment_ID, '', 'check-ham' );
|
| 292 |
+
// Status could be spam or trash, depending on the WP version and whether this change applies:
|
| 293 |
+
// https://core.trac.wordpress.org/changeset/34726
|
| 294 |
+
if ( $comment->comment_approved == 'spam' || $comment->comment_approved == 'trash' ) {
|
| 295 |
if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) )
|
| 296 |
self::update_comment_history( $comment->comment_ID, '', 'wp-blacklisted' );
|
| 297 |
else
|
| 750 |
$comment1 = (array) $comment1;
|
| 751 |
$comment2 = (array) $comment2;
|
| 752 |
|
| 753 |
+
$comments_match = (
|
| 754 |
isset( $comment1['comment_post_ID'], $comment2['comment_post_ID'] )
|
| 755 |
&& intval( $comment1['comment_post_ID'] ) == intval( $comment2['comment_post_ID'] )
|
| 756 |
&& (
|
| 762 |
substr( $comment1['comment_author'], 0, 248 ) == substr( $comment2['comment_author'], 0, 248 )
|
| 763 |
|| substr( stripslashes( $comment1['comment_author'] ), 0, 248 ) == substr( $comment2['comment_author'], 0, 248 )
|
| 764 |
|| substr( $comment1['comment_author'], 0, 248 ) == substr( stripslashes( $comment2['comment_author'] ), 0, 248 )
|
| 765 |
+
// Certain long comment author names will be truncated to nothing, depending on their encoding.
|
| 766 |
+
|| ( ! $comment1['comment_author'] && strlen( $comment2['comment_author'] ) > 248 )
|
| 767 |
+
|| ( ! $comment2['comment_author'] && strlen( $comment1['comment_author'] ) > 248 )
|
| 768 |
)
|
| 769 |
&& (
|
| 770 |
// The email max length is 100 characters, limited by the VARCHAR(100) column type.
|
| 777 |
|| ( ! $comment2['comment_author_email'] && strlen( $comment1['comment_author_email'] ) > 100 )
|
| 778 |
)
|
| 779 |
);
|
| 780 |
+
|
| 781 |
+
return $comments_match;
|
| 782 |
}
|
| 783 |
|
| 784 |
// Does the supplied comment match the details of the one most recently stored in self::$last_comment?
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs
|
| 3 |
Tags: akismet, comments, spam, antispam, anti-spam, anti spam, comment moderation, comment spam, contact form spam, spam comments
|
| 4 |
Requires at least: 3.2
|
| 5 |
-
Tested up to: 4.
|
| 6 |
-
Stable tag: 3.1.
|
| 7 |
License: GPLv2 or later
|
| 8 |
|
| 9 |
Akismet checks your comments against the Akismet Web service to see if they look like spam or not.
|
|
@@ -30,6 +30,13 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
|
|
| 30 |
|
| 31 |
== Changelog ==
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
= 3.1.9 =
|
| 34 |
*Release Date - 28 March 2016*
|
| 35 |
|
| 2 |
Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs
|
| 3 |
Tags: akismet, comments, spam, antispam, anti-spam, anti spam, comment moderation, comment spam, contact form spam, spam comments
|
| 4 |
Requires at least: 3.2
|
| 5 |
+
Tested up to: 4.5
|
| 6 |
+
Stable tag: 3.1.10
|
| 7 |
License: GPLv2 or later
|
| 8 |
|
| 9 |
Akismet checks your comments against the Akismet Web service to see if they look like spam or not.
|
| 30 |
|
| 31 |
== Changelog ==
|
| 32 |
|
| 33 |
+
= 3.1.10 =
|
| 34 |
+
*Release Date - 1 April 2016*
|
| 35 |
+
|
| 36 |
+
* Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
|
| 37 |
+
* Fixed a bug that could have resulted in comments that were caught by the core WordPress comment blacklist not to have a corresponding History entry.
|
| 38 |
+
* Fixed a bug that could have caused avoidable PHP warnings in the error log.
|
| 39 |
+
|
| 40 |
= 3.1.9 =
|
| 41 |
*Release Date - 28 March 2016*
|
| 42 |
|
