[buddypress-trac] [BuddyPress] #3667: Spammers can post forum topics

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Oct 11 14:24:16 UTC 2011


#3667: Spammers can post forum topics
--------------------------+--------------------
 Reporter:  DJPaul        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  1.5.1
Component:  Forums        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  commit        |
--------------------------+--------------------
Changes (by boonebgorges):

 * keywords:   => commit


Comment:

 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.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3667#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list