Recent Topics

[4.1.x] Comments Being Posted Even Though Disabled

Started by on Sep 05, 2012 – Contents updated: Sep 05, 2012

Sep 05, 2012 20:58    

My b2evolution Version: 4.1.x

I have comment posting disabled in blog properties and yet I am still getting spam comments - what gives?

Sep 06, 2012 03:54

Edit the following in /htsrv/comment_post.php line 46

PHP

if( ! $commented_Item->can_commentNULL ) )
{
    $Messages->addT_('You cannot leave comments on this post!'), 'error' );
 
    // Exit asap
    header_redirect();
}

Sep 06, 2012 05:24

Thanks - will this prevent me from enabling comment posting elsewhere or only when disabled?

Sep 06, 2012 08:45

is this supposed to be a bug ?

sam2kb wrote:

Edit the following in /htsrv/comment_post.php line 46

PHP

if( ! $commented_Item->can_commentNULL ) )
{
    $Messages->addT_('You cannot leave comments on this post!'), 'error' );
 
    // Exit asap
    header_redirect();
}

Sep 06, 2012 19:40

Thanks - will this prevent me from enabling comment posting elsewhere or only when disabled?

The extra string is just an extra layer of security, it doesn't change b2evo functionality.

is this supposed to be a bug ?

A flaw for sure.
The comment should be rejected anyway since we add an error message. But who knows what plugins do, they may clear errors and the comment will go through. Anyway, there's no reason to process comments if they are not allowed.

I already added that to SVN.

Sep 24, 2012 03:15

Alex I cannot even post a comment when logged as admin on a plain install of trunk!

Sep 24, 2012 03:52

@fplanque
It's not me, I only added header_redirect() which must be there anyway. Look at new Item::is_locked() method, I believe that's the actual cause of the error.

Sep 24, 2012 22:58

Ah ok sorry Alex. (and it's been fixed today)


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.