From e34cba8c9c127203e56f3679cd627d2d1d72f54e Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 28 Aug 2017 15:51:00 -0400 Subject: Bug 1393643 - Add whitelist to rate limiting code (#220) * Bug 1393643 - Add whitelist to rate limiting code * use version that has new module * add memcache to bloomfilter loading --- scripts/bloomfilter-populate.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/bloomfilter-populate.pl (limited to 'scripts') diff --git a/scripts/bloomfilter-populate.pl b/scripts/bloomfilter-populate.pl new file mode 100644 index 000000000..c591a61b3 --- /dev/null +++ b/scripts/bloomfilter-populate.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl -w +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +use strict; +use warnings; +use lib qw(. lib local/lib/perl5); + +use Bugzilla; +use Bugzilla::Constants; +use Bugzilla::Bloomfilter; + +# set Bugzilla usage mode to USAGE_MODE_CMDLINE +Bugzilla->usage_mode(USAGE_MODE_CMDLINE); + +my $name = shift @ARGV or die "usage: $0 \$name < list\n"; +my @lines = ; +chomp @lines; +Bugzilla::Bloomfilter->populate($name, \@lines); + -- cgit v1.2.3-24-g4f1b