19 · 06

Spam in dotClear1

I receive a lot of spam comments for few months. They contain almost the same data, a list of URLs. So I decided to prohibit URLs in comments. In the future, if you want to give some URLs in your comments, please strip "http://" in front of it. If your are interested, I've just added this code near line 269 of the file layout/prepend.php of dotclear 1.2.6 :
if (stripos($in_content, 'http://') !== false)
{
    $form_err = 'Url in comments are not allowed for spam reasons, please strip "http://" in front of your URL.';
}
elseif ($blog->addComment($post_id,$c_nom,$c_mail,$c_site,
        $in_content,0,dc_time_delta,dc_comments_pub) === false)
{
...
If this small change is sufficient, maybe I'll publish comments directly.
EDIT: Due to dotclear2 migration, comments are directly published and url are allowed.