diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-08-28 21:51:00 +0200 |
---|---|---|
committer | Mary Umoh <umohm12@gmail.com> | 2017-08-28 21:51:00 +0200 |
commit | e34cba8c9c127203e56f3679cd627d2d1d72f54e (patch) | |
tree | 177bb3ba6942925ab3a7bd2bfbf1baccd1eafd43 /scripts | |
parent | 0fdb8be1599283df80ae3b52f2254b847152a60f (diff) | |
download | bugzilla-e34cba8c9c127203e56f3679cd627d2d1d72f54e.tar.gz bugzilla-e34cba8c9c127203e56f3679cd627d2d1d72f54e.tar.xz |
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
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/bloomfilter-populate.pl | 21 |
1 files changed, 21 insertions, 0 deletions
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 = <STDIN>; +chomp @lines; +Bugzilla::Bloomfilter->populate($name, \@lines); + |