--- lib/MT/App/Search.pm.orig Fri Jan 30 12:47:04 2004 +++ lib/MT/App/Search.pm Fri Jan 30 12:54:36 2004 @@ -34,6 +34,12 @@ my $file = File::Spec->catfile($cfg->TempDir, 'mt-throttle.db'); my $DB = tie my %db, 'DB_File', $file; if ($DB) { + #throttle total number of searches + my $max_searches = 5; + if (scalar(keys %db) > $max_searches ) { + return $app->error($app->translate( + "Too many searches are ongoing. Please try yours again later.")); + } my $ip = $app->remote_ip; if (my $time = $db{$ip}) { if ($time > time - 60) { ## Within the last minute.