[wp-hackers] Why is Akismet returning more info in the $commentdata ?

Doug Stewart zamoose at gmail.com
Sat Dec 19 05:06:04 UTC 2009


On Fri, Dec 18, 2009 at 11:31 PM, Peter van der Does <peter at avirtualhome.com
> wrote:

> Akismet is adding several fields to commentdata during the
> preprocess_comment filter. The function called is
> akismet_auto_check_comment.
>
> The following fields are added:
>
> $comment['user_ip']    = preg_replace( '/[^0-9., ]/', '',
> $_SERVER['REMOTE_ADDR'] );
> $comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
> $comment['referrer']   = $_SERVER['HTTP_REFERER'];
> $comment['blog']       = get_option('home');
> $comment['blog_lang']  = get_locale();
> $comment['blog_charset'] = get_option('blog_charset');
> $comment['permalink']  = get_permalink($comment['comment_post_ID']);
>
>
> Why is this?
>
>
...Because all those pieces of information are useful in determining
potential spam?

If someone is leaving Cyrillic-encoded comments on a blog using the English
(US) locale, there's a good chance it's spam, for instance.

At least that's my read on it.  Each of those pieces of info could be quite
useful in determining in a heuristic/holistic fashion the chance that a
spammer is doing the commenting.

-- 
-Doug
@zamoose
http://literalbarrage.org/blog/


More information about the wp-hackers mailing list