WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4261 closed defect (bug) (wontfix)

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

Reported by: 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)

comment:1 @JeremyVisser8 years ago

  • Milestone changed from 2.4 to 2.3

comment:2 @JeremyVisser8 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.') );
}

comment:3 @JeremyVisser8 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);

?>

comment:4 @JeremyVisser8 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.

comment:5 @RuddO8 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.

comment:6 @rob1n8 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.