Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4261 closed defect (bug) (wontfix)

You are posting comments too quickly. Slow down. Not!

Reported by: ruddo's profile RuddO Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:

Description

I'm using Squid to front Apache/WordPress. When two different people comment in a 15-second timespan, the second one gets booted because of WP's rate-limiting in commenting. The thing is, it is apparently taking the IP address (127.0.0.1 if using Squid) as the reference.

Need a switch to toggle this protection off, or smarter discrimination based on other info than the IP address, for us Squid users.

Change History (6)

#1 @JeremyVisser
17 years ago

  • Milestone changed from 2.4 to 2.3

#2 @JeremyVisser
17 years ago

Actually, is this what you're looking for?

$flood_die = apply_filters('comment_flood_filter', false, $time_lastcomment, $time_newcomment);
if ( $flood_die ) {
     do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment);
     wp_die( __('You are posting comments too quickly.  Slow down.') );
}

#3 @JeremyVisser
17 years ago

Something like the following could fix this: (warning, untested)

<?php
/*
Plugin Name: WP+Squid Commenting Fix
Plugin Author: Rudd-O
*/

remove_filter('comment_flood_filter', 'wp_throttle_comment_flood', 10, 3);

?>

#4 @JeremyVisser
17 years ago

  • Milestone 2.3 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

OK, I just tested the above plugin on my dev machine and it works perfectly.

#5 @RuddO
17 years ago

Oh, fantastic! Thanks :-) It wouldn't hurt to have it as an option in the Commenting form, though -- if HTTP compression gets its own checkbox, I don't see how this doesn't deserve it.

#6 @rob1n
17 years ago

Your case is a fringe case. A simple one-liner can fix it. I see no need for a checkbox for this.

Gzip compression, on the other hand, is something that is rather useful, especially on high-traffic sites.

Note: See TracTickets for help on using tickets.