Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3667 closed defect (bug) (fixed)

Spammers can post forum topics

Reported by: djpaul's profile DJPaul Owned by:
Milestone: 1.5.2 Priority: normal
Severity: normal Version:
Component: Forums Keywords:
Cc:

Description

It's possible for users marked as spammers to create new forum topics and replies.

Attachments (1)

suzuka-1.patch (1.3 KB) - added by DJPaul 13 years ago.

Download all attachments as: .zip

Change History (7)

@DJPaul
13 years ago

#1 @DJPaul
13 years ago

Attached patch has been tested, but I haven't committed it as I'm not sure if these should be done higher up the chain someplace.

#2 @boonebgorges
13 years ago

  • Keywords commit added

As we discussed yesterday, I think that in a perfect world we would check this all the way at the top of the chain (or bottom, depending on your point of view) - right in the WPDB query class. There is a filter right at the beginning of WPDB:query() that would allow us to do something like the following (not tested of course):

function bp_block_spammers( $query ) {
  if ( bp_core_is_user_spammer( bp_loggedin_user_id() ) && ( 0 === strpos( $query, 'UPDATE' ) || 0 === strpos( $query, 'INSERT' ) ) ) {
    $query = '';
  }
  return $query;
}
add_filter( 'query', 'bp_block_spammers', 999 );

I don't think we should be doing anything like this in the short term (or maybe ever, I would have to think about it :) ) but points toward a more general solution to the spammer issue. Also, we'd probably need to do it separately for bbPress 1.0 queries.

Anyway, suzuka-1.patch looks good to me for now. I say go with it.

#3 @DJPaul
13 years ago

  • Keywords commit removed

I think we should implement/test the semi-bozo idea which was discussed the other week before we put in these bail-out patches

#4 @DJPaul
13 years ago

John's put most of this in; r5243 (trunk), r5244 (1.5 branch).

#5 @djpaul
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5245]) Fix admins being unable to edit topics made by users who have since been marked as spammers. Fixes #3667

#6 @djpaul
13 years ago

(In [5246]) Fix admins being unable to edit topics made by users who have since been marked as spammers. Fixes #3667

Note: See TracTickets for help on using tickets.