Unverified Commit 9e8fbe66 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1116 from ikedas/replace_blacklist_with_blocklist by ikedas

Replace "blacklist" with "blocklist" (#1111)
parents 006af324 cc32e7ce
......@@ -187,7 +187,7 @@ nobase_default_DATA = \
web_tt2/arcsearch.tt2 \
web_tt2/arc.tt2 \
web_tt2/aside_menu.tt2 \
web_tt2/blacklist.tt2 \
web_tt2/blocklist.tt2 \
web_tt2/button_footer.tt2 \
web_tt2/button_header.tt2 \
web_tt2/ca.tt2 \
......
......@@ -651,7 +651,7 @@ Warning: this message may already have been sent by one of the list's moderators
[%~ ELSIF report_entry == 'incorrect_email' ~%]
[%|loc(report_param.email || report_param.value)%]Address "%1" is incorrect[%END%]
[%~ ELSIF report_entry == 'blacklisted_domain' ~%]
[%~ ELSIF report_entry == 'blocklisted_domain' ~%]
[%|loc(report_param.email || report_param.value)%]Address "%1" belongs to a blocklisted domain[%END%]
[%~ ELSIF report_entry == 'incorrect_passwd' ~%]
......
......@@ -12,9 +12,9 @@
<strong><a href="[% 'review' | url_rel([list]) %]">[%|loc%]Manage Subscribers:[%END%]</a></strong>
[%|loc%]Allows you to add or delete list members, moderate subscriptions, and so on.[%END%]
</li>
[% IF conf.use_blacklist != 'none' %]
[% IF conf.use_blocklist != 'none' %]
<li>
<strong><a href="[% 'blacklist' | url_rel([list]) %]" >[%|loc%]Blocklist:[%END%]</a></strong>
<strong><a href="[% 'blocklist' | url_rel([list]) %]" >[%|loc%]Blocklist:[%END%]</a></strong>
[%|loc%]Handles the set of black-listed mail addresses for this list.[%END%]
</li>
[% END %]
......
<!-- blacklist.tt2 -->
<!-- blocklist.tt2 -->
<div class="block">
<h2>[%|loc%]Blocklist management[%END%]</h2><br />
<div id="blacklist">
<div id="blocklist">
[% IF rows == '0' %]
<p class="small-12 medium-8 medium-centered columns alert-box info text-center">[%|loc%]The current blocklist is empty[%END%]</p>
[% ELSE %]
<p class="small-12 medium-8 medium-centered columns alert-box info text-center">[%|loc(rows)%]The current blocklist contains %1 line(s)[%END%]</p>
[% END %]
[%|loc(conf.use_blacklist)%]Operation requested by users which email is listed in the blocklist file are rejected. The blocklist is in use for the following operation: %1.[%END%]
[%|loc(conf.use_blocklist)%]Operation requested by users which email is listed in the blocklist file are rejected. The blocklist is in use for the following operation: %1.[%END%]
<br />
<br />
[%|loc%]Syntax:[%END%]
......@@ -23,18 +23,18 @@
[% IF rows < '10' %] [% rows = '10' %] [% END %]
[% IF rows > '20' %] [% rows = '20' %] [% END %]
[% rows = rows+2 %]
<form class="noborder" action="[% 'blacklist' | url_rel %]" method="post">
<form class="noborder" action="[% 'blocklist' | url_rel %]" method="post">
<fieldset>
<textarea name="blacklist" cols="80" rows="[% rows %]">
[%~ blacklist ~%]
<textarea name="blocklist" cols="80" rows="[% rows %]">
[%~ blocklist ~%]
</textarea>
<br />
<input type="hidden" name="action" value="blacklist" />
<input type="hidden" name="action" value="blocklist" />
[% IF list %]
<input type="hidden" name="list" value="[% list %]" />
[% END %]
<br />
<input type="submit" class="MainMenuLinks" name="action_blacklist" value="[%|loc%]save[%END%]" />
<input type="submit" class="MainMenuLinks" name="action_blocklist" value="[%|loc%]save[%END%]" />
[% IF saved %]
[%|loc%]Template saved[%END%] ([% time %]) <br /><br />
[% END %]
......@@ -42,4 +42,4 @@
</form>
</div>
</div>
<!-- end blacklist.tt2 -->
<!-- end blocklist.tt2 -->
......@@ -1352,7 +1352,7 @@ ul.no_style {
margin: 1em;
}
#help_editfile ul, #blacklist ul {
#help_editfile ul, #blocklist ul {
padding-left: 1em;
margin-top: 0.5em;
margin-bottom: 0.5em;
......
......@@ -126,10 +126,10 @@
[%|loc %]Report messages as undetected spam[%END%]
</label>
[% END ~%]
[% IF conf.use_blacklist != 'none' ~%]
<input type="checkbox" id="blacklist" name="blacklist"
[% IF conf.use_blocklist != 'none' ~%]
<input type="checkbox" id="blocklist" name="blocklist"
form="moderate_mails" />
<label for="blacklist">
<label for="blocklist">
[%|loc %]Add to blocklist[%END%]
</label>
[% END ~%]
......@@ -154,8 +154,8 @@
<form class="noborder" action="[% path_cgi %]" method="post" name="moderation_management">
<fieldset>
<input type="hidden" name="list" value="[% list %]" />
[% IF conf.use_blacklist != 'none' %]
<input class="MainMenuLinks" type="submit" name="action_blacklist" value="[%|loc%]edit blocklist[%END%]" />
[% IF conf.use_blocklist != 'none' %]
<input class="MainMenuLinks" type="submit" name="action_blocklist" value="[%|loc%]edit blocklist[%END%]" />
[% END %]
<input class="MainMenuLinks" type="submit" name="action_manage_template" value="[%|loc%]Manage rejection messages[%END%]" />
</fieldset>
......
......@@ -365,14 +365,14 @@
</ul>
</li>
[%~ END %]
[% IF conf.use_blacklist != 'none' %]
[% IF action == 'blacklist' %]
[% IF conf.use_blocklist != 'none' %]
[% IF action == 'blocklist' %]
[% SET class = 'active' %]
[% ELSE %]
[% SET class = '' %]
[% END %]
<li class="[% class %]">
<a href="[% 'blacklist' | url_rel([list]) %]" >
<a href="[% 'blocklist' | url_rel([list]) %]" >
[%|loc%]Blocklist[%END%]
</a>
</li>
......
......@@ -30,8 +30,8 @@
<a class="actionMenuLinks" href="[% 'sigindex' | url_rel([list]) %]">
[%|loc%]Pending unsubscriptions[%END%]
</a>
[% IF conf.use_blacklist != 'none' %]
<a class="actionMenuLinks" href="[% 'blacklist' | url_rel([list]) %]">
[% IF conf.use_blocklist != 'none' %]
<a class="actionMenuLinks" href="[% 'blocklist' | url_rel([list]) %]">
[%|loc%]Blocklist[%END%]
</a>
[% END %]
......
......@@ -43,7 +43,7 @@
</p>
[%~ END %]
<p>
<input type=checkbox name="blacklist" />[%|loc%]Add to blocklist[%END%]
<input type=checkbox name="blocklist" />[%|loc%]Add to blocklist[%END%]
</p>
[% IF is_owner && ! msg.value.is_subscriber ~%]
<p>
......
......@@ -301,7 +301,7 @@ our %comm = (
#'rss' => 'do_rss', #FIXME:Currently processed in differenct way.
'rss_request' => 'do_rss_request',
'maintenance' => 'do_maintenance',
'blacklist' => 'do_blacklist',
'blocklist' => 'do_blocklist',
'edit_attributes' => 'do_edit_attributes',
'ticket' => 'do_ticket',
'manage_template' => 'do_manage_template',
......@@ -335,6 +335,7 @@ my %comm_aliases = (
'add_request' => 'import',
'automatic_lists' => 'create_automatic_list',
'automatic_lists_request' => 'create_automatic_list_request',
'blacklist' => 'blocklist',
'change_email' => 'move_user',
'change_email_request' => 'move_user',
'del_fromsig' => 'auth_del',
......@@ -516,7 +517,7 @@ our %required_args = (
'auth_del' => ['param.list', 'param.user.email', 'id'],
'auto_signoff' => ['param.list', 'email'],
'attach' => ['param.list'],
'blacklist' => ['param.list'],
'blocklist' => ['param.list'],
'move_user' =>
['param.user.email', 'current_email|old_email', 'email|new_email'],
'close_list' => ['param.user.email', 'param.list'],
......@@ -653,7 +654,7 @@ our %required_privileges = (
'arc_manage' => ['owner'],
'auth_add' => ['owner', 'editor'],
'auth_del' => ['owner', 'editor'],
'blacklist' => ['owner', 'editor'],
'blocklist' => ['owner', 'editor'],
'close_list' => ['privileged_owner'],
'copy_template' => ['listmaster'],
'd_install_shared' => ['editor', 'owner'],
......@@ -783,7 +784,7 @@ my %action_type = (
'remove_template' => 'admin',
'copy_template' => 'admin',
'edit_template' => 'admin',
'blacklist' => 'admin',
'blocklist' => 'admin',
'viewlogs' => 'admin',
'serveradmin' => 'serveradmin',
'get_pending_lists' => 'serveradmin',
......@@ -841,7 +842,8 @@ our %in_regexp = (
'body' => '.+',
'info' => '.+',
'new_scenario_content' => '.+',
'blacklist' => '.*',
'blacklist' => '.*', # Compat.<=6.2.60
'blocklist' => '.*',
 
## Integer
'page' => '\d+|owner|editor',
......@@ -1151,7 +1153,7 @@ while ($query = Sympa::WWW::FastCGI->new) {
'main_menu_custom_button_3_title',
'main_menu_custom_button_3_target',
'static_content_url',
'use_blacklist',
'use_blocklist',
'antispam_feature',
'custom_robot_parameter',
'reporting_spam_script_path',
......@@ -1175,6 +1177,8 @@ while ($query = Sympa::WWW::FastCGI->new) {
$param->{'css_url'} = sprintf '%s/%s', $Conf::Conf{'css_url'}, $robot;
# Compat. < 6.2.32: "host" parameter was deprecated.
$param->{'conf'}{'host'} = Conf::get_robot_conf($robot, 'domain');
# Compat. < 6.2.62: Renamed parameters.
$param->{'conf'}{'use_blacklist'} = Conf::get_robot_conf($robot, 'use_blocklist');
 
foreach my $auth (keys %{$Conf::Conf{'cas_id'}{$robot}}) {
$log->syslog('debug2', 'CAS authentication service %s', $auth);
......@@ -2051,6 +2055,10 @@ sub get_parameters {
$param->{'nomenu'} = $in{'nomenu'};
}
 
# Compatibility to the templates customized for version <=6.2.60:
# 'blacklist' was renamed to 'blocklist'.
$in{'blocklist'} //= $in{'blacklist'} if defined $in{'blacklist'};
# From CGI URL get {base_url} and {path_cgi} parameters.
# Note that other links should keep the nomenu attribute.
# NOTE: The base_url is kept for compatibility to Sympa < 6.2.15. The
......@@ -7678,7 +7686,7 @@ sub do_d_reject_shared {
# do_reject
####################################################
# Moderation of messages : rejects messages and notifies
# their senders. If in{'blacklist'} add sender to list blacklist
# their senders. If in{'blocklist'} add sender to list blocklist
#
# IN : -
#
......@@ -7700,15 +7708,15 @@ sub do_reject {
$in{'quiet'} = 1;
delete $in{'message_template'};
}
if ($in{'blacklist'}) {
if ($in{'blocklist'}) {
$in{'quiet'} = 1;
}
 
wwslog('info', '(%s)', $in{'id'});
my $file;
 
$param->{'blacklist_added'} = 0;
$param->{'blacklist_ignored'} = 0;
$param->{'blocklist_added'} = 0;
$param->{'blocklist_ignored'} = 0;
foreach my $id (split(/,/, $in{'id'})) {
next unless $id and $id =~ /\A\w+\z/;
 
......@@ -7737,8 +7745,8 @@ sub do_reject {
}
 
# extract sender address is needed to report reject to sender and in
# case the sender is to be added to the blacklist
if (($in{'quiet'} ne '1') || ($in{'blacklist'})) {
# case the sender is to be added to the blocklist
if (($in{'quiet'} ne '1') || ($in{'blocklist'})) {
my $rejected_sender = $message->{'sender'};
if ($rejected_sender) {
unless ($in{'message_template'} eq 'reject_quiet') {
......@@ -7757,23 +7765,23 @@ sub do_reject {
);
}
}
if ($in{'blacklist'}) {
if (_add_in_blacklist($rejected_sender, $robot, $list)) {
$param->{'blacklist_added'} += 1;
if ($in{'blocklist'}) {
if (_add_in_blocklist($rejected_sender, $robot, $list)) {
$param->{'blocklist_added'} += 1;
wwslog('info',
"added $rejected_sender to $list->{'name'} blacklist"
"added $rejected_sender to $list->{'name'} blocklist"
);
} else {
wwslog('notice',
"Unable to add $rejected_sender to $list->{'name'} blacklist"
"Unable to add $rejected_sender to $list->{'name'} blocklist"
);
$param->{'blacklist_ignored'} += 0;
$param->{'blocklist_ignored'} += 0;
}
}
} else {
$log->syslog(
'err',
'No sender found for message %s. Unable to use her address to add to blacklist or send notification',
'No sender found for message %s. Unable to use her address to add to blocklist or send notification',
$message
);
}
......@@ -15745,8 +15753,8 @@ sub export_topics {
$param->{'topics'}[int($total / 2)]{'next'} = 1;
}
 
# manage blacklist
sub do_blacklist {
# manage blocklist
sub do_blocklist {
wwslog('info', '(%s)', $param->{'list'});
 
unless ($param->{'list'}) {
......@@ -15786,11 +15794,11 @@ sub do_blacklist {
);
return undef;
}
my $file = $list->{'dir'} . '/search_filters/blacklist.txt';
my $file = $list->{'dir'} . '/search_filters/blocklist.txt';
$param->{'rows'} = 0;
 
if (defined $in{'blacklist'}) {
wwslog('info', 'Submit blacklist update');
if (defined $in{'blocklist'}) {
wwslog('info', 'Submit blocklist update');
my $dir = $list->{'dir'} . '/search_filters';
unless ((-d $dir) || mkdir($dir, 0755)) {
Sympa::WWW::Report::reject_report_web('intern',
......@@ -15809,8 +15817,9 @@ sub do_blacklist {
}
);
}
my $file = $dir . '/blacklist.txt';
unless (open BLACKLIST, "> $file") {
my $file = $dir . '/blocklist.txt';
my $ofh;
unless (open $ofh, '>', $file) {
Sympa::WWW::Report::reject_report_web('intern',
'unable to create file');
wwslog('info', 'Unable to create file %s', $file);
......@@ -15827,27 +15836,27 @@ sub do_blacklist {
}
);
}
my @lines = split(/\r\n|\r|\n/, $in{'blacklist'});
my @lines = split(/\r\n|\r|\n/, $in{'blocklist'});
$param->{'ignored'} = 0;
my $count =
0; # count utils lines in order to remove empty blacklist file
0; # count utils lines in order to remove empty blocklist file
foreach my $line (@lines) {
if ($line =~ /\*.*\*/) {
$param->{'ignored_linest'} .= $line . "\n";
$param->{'ignored'} += 1;
} else {
print BLACKLIST "$line\n";
$param->{'blacklist'} .= $line . "\n";
print $ofh "$line\n";
$param->{'blocklist'} .= $line . "\n";
$param->{'rows'} += 1;
$count += 1 unless ($line =~ /^\s*$/o || /^[\#\;]/o);
}
}
close BLACKLIST;
close $ofh;
if ($count == 0) {
unless (unlink $file) {
Sympa::WWW::Report::reject_report_web('intern',
'unable to remove empty blacklist file');
wwslog('info', 'Unable to remove empty blacklist file %s',
'unable to remove empty blocklist file');
wwslog('info', 'Unable to remove empty blocklist file %s',
$file);
web_db_log(
{ 'robot' => $robot,
......@@ -15862,11 +15871,12 @@ sub do_blacklist {
}
);
}
wwslog('info', 'Removed empty blacklist file %s', $file);
wwslog('info', 'Removed empty blocklist file %s', $file);
}
} else {
if (-f $file) {
unless (open BLACKLIST, $file) {
my $ifh;
unless (open $ifh, $file) {
Sympa::WWW::Report::reject_report_web(
'intern',
'unable to open file',
......@@ -15887,11 +15897,11 @@ sub do_blacklist {
}
);
}
while (<BLACKLIST>) {
$param->{'blacklist'} .= $_;
while (<$ifh>) {
$param->{'blocklist'} .= $_;
$param->{'rows'} += 1;
}
close BLACKLIST;
close $ifh;
}
}
 
......@@ -17381,7 +17391,7 @@ sub prevent_visibility_bypass {
#sub purely_closed;
 
# Old name: tools::add_in_blacklist().
sub _add_in_blacklist {
sub _add_in_blocklist {
my $entry = shift;
my $robot = shift;
my $list = shift;
......@@ -17390,10 +17400,10 @@ sub _add_in_blacklist {
$entry = lc($entry);
chomp $entry;
 
# robot blacklist not yet availible
# robot blocklist not yet availible
unless ($list) {
$log->syslog('info',
'Robot blacklist not yet availible, missing list parameter');
'Robot blocklist not yet availible, missing list parameter');
return undef;
}
unless (($entry) && ($robot)) {
......@@ -17409,7 +17419,7 @@ sub _add_in_blacklist {
$log->syslog('info', 'Unable to create dir %s', $dir);
return undef;
}
my $file = $dir . '/blacklist.txt';
my $file = $dir . '/blocklist.txt';
 
my $fh;
if (open $fh, '<', $file) {
......@@ -17420,7 +17430,7 @@ sub _add_in_blacklist {
$regexp =~ s/\*/.*/;
$regexp = '^' . $regexp . '$';
if ($entry =~ /$regexp/i) {
$log->syslog('notice', '%s already in blacklist(%s)',
$log->syslog('notice', '%s already in blocklist(%s)',
$entry, $_);
return 0;
}
......
......@@ -1703,6 +1703,8 @@ sub _load_config_file_to_hash {
$keyword = {
merge_feature =>
'personalization_feature', # 6.0b.2 - 6.2.59b.1
use_blacklist => 'use_blocklist', # 5.3a.4 - 6.2.60
domains_blacklist => 'domains_blocklist', # 6.2.41b.1 - 6.2.60
}->{$keyword} // $keyword;
if ( exists $params{$keyword}
......@@ -1845,7 +1847,7 @@ sub _infer_server_specific_parameter_values {
}
foreach
my $action (split /\s*,\s*/, $param->{'config_hash'}{'use_blacklist'})
my $action (split /\s*,\s*/, $param->{'config_hash'}{'use_blocklist'})
{
next unless $action =~ /\A[.\w]+\z/;
# Compat. <= 6.2.38
......@@ -1860,7 +1862,7 @@ sub _infer_server_specific_parameter_values {
}->{$action}
|| $action;
$param->{'config_hash'}{'blacklist'}{$action} = 1;
$param->{'config_hash'}{'blocklist'}{$action} = 1;
}
if ($param->{'config_hash'}{'ldap_export_name'}) {
......@@ -1937,8 +1939,8 @@ sub _infer_robot_parameter_values {
. '-request@'
. $param->{'config_hash'}{'domain'};
# split action list for blacklist usage
foreach my $action (split /\s*,\s*/, $Conf{'use_blacklist'}) {
# split action list for blocklist usage
foreach my $action (split /\s*,\s*/, $Conf{'use_blocklist'}) {
next unless $action =~ /\A[.\w]+\z/;
# Compat. <= 6.2.38
$action = {
......@@ -1952,7 +1954,7 @@ sub _infer_robot_parameter_values {
}->{$action}
|| $action;
$param->{'config_hash'}{'blacklist'}{$action} = 1;
$param->{'config_hash'}{'blocklist'}{$action} = 1;
}
# Hack because multi valued parameters are not available for Sympa 6.1.
......
......@@ -1418,7 +1418,7 @@ our %pinfo = (
gettext_id => 'Who is able to change user\'s email',
scenario => 'move_user',
},
use_blacklist => {
use_blocklist => {
context => [qw(domain site)],
order => 30.00_05,
group => 'command',
......@@ -1429,6 +1429,7 @@ our %pinfo = (
'List of operations separated by comma for which blocklist filter is applied. Setting this parameter to "none" will hide the blocklist feature.',
format => '[-.\w]+',
},
use_blacklist => {obsolete => 'use_blocklist'},
### Priviledges on the lists
......@@ -5418,7 +5419,7 @@ our %pinfo = (
# Various miscellaneous
domains_blacklist => {
domains_blocklist => {
context => [qw(site)],
order => 190.71,
group => 'www_other',
......@@ -5428,6 +5429,8 @@ our %pinfo = (
sample => 'example.org,spammer.com',
split_char => ',',
},
domains_blacklist => {obsolete => 'domains_blocklist'},
quiet_subscription => {
context => [qw(site)],
order => 190.72,
......
......@@ -3255,8 +3255,8 @@ sub add_list_member {
$new_user->{'email'});
next;
}
if (Sympa::Tools::Domains::is_blacklisted($who)) {
$log->syslog('err', 'Ignoring %s which uses a blacklisted domain',
if (Sympa::Tools::Domains::is_blocklisted($who)) {
$log->syslog('err', 'Ignoring %s which uses a blocklisted domain',
$new_user->{'email'});
next;
}
......
......@@ -433,7 +433,7 @@ sub get_first_db_log {
'list_management' => [
'create_list', 'rename_list',
'close_list', 'edit_list',
'admin', 'blacklist',
'admin', 'blocklist',
'install_pending_list', 'purge_list',
'edit_template', 'copy_template',
'remove_template'
......
......@@ -72,11 +72,11 @@ sub _twist {
return undef;
}
if (Sympa::Tools::Domains::is_blacklisted($email)) {
$self->add_stash($request, 'user', 'blacklisted_domain',
if (Sympa::Tools::Domains::is_blocklisted($email)) {
$self->add_stash($request, 'user', 'blocklisted_domain',
{'email' => $email});
$log->syslog('err',
'ADD command rejected; blacklisted domain for "%s"', $email);
'ADD command rejected; blocklisted domain for "%s"', $email);
return undef;
}
......
......@@ -73,11 +73,11 @@ sub _twist {
undef $comment;
}
if (Sympa::Tools::Domains::is_blacklisted($email)) {
$self->add_stash($request, 'user', 'blacklisted_domain',
if (Sympa::Tools::Domains::is_blocklisted($email)) {
$self->add_stash($request, 'user', 'blocklisted_domain',
{'email' => $email});
$log->syslog('err',
'SUBSCRIBE to %s command rejected; blacklisted domain for "%s"',
'SUBSCRIBE to %s command rejected; blocklisted domain for "%s"',
$list, $email);
return undef;
}
......
......@@ -535,12 +535,12 @@ sub _compile_scenario {
}
}
## Include a Blacklist rules if configured for this action
if ($function and $Conf::Conf{'blacklist'}{$function}) {
## Include a Blocklist rules if configured for this action
if ($function and $Conf::Conf{'blocklist'}{$function}) {
## Add rules at the beginning of the array
unshift @rules,
{
'condition' => "search('blacklist.txt',[sender])",
'condition' => "search('blocklist.txt',[sender])",
'action' => 'reject,quiet',
'auth_method' => ['smtp', 'dkim', 'md5', 'pgp', 'smime'],
};
......@@ -1424,9 +1424,9 @@ sub do_search {
'order' => 'all'
);
## Raise an error except for blacklist.txt
## Raise an error except for blocklist.txt
unless (@files) {
if ($filter_file eq 'blacklist.txt') {
if ($filter_file eq 'blocklist.txt') {
return 0;
} else {
$log->syslog('err', 'Could not find search filter %s',
......
......@@ -28,12 +28,12 @@ use warnings;
use Conf;
use Sympa::Tools::Text;
sub is_blacklisted {
sub is_blocklisted {
my $email = shift;
if (defined($Conf::Conf{'domains_blacklist'})) {
if (defined($Conf::Conf{'domains_blocklist'})) {
my @parts = split '@', Sympa::Tools::Text::canonic_email($email);
foreach my $f (split ',', lc($Conf::Conf{'domains_blacklist'})) {
foreach my $f (split ',', lc($Conf::Conf{'domains_blocklist'})) {
if ($parts[1] && $parts[1] eq $f) {
return 1;
}
......@@ -60,12 +60,12 @@ This package provides some email's domains-related functions.
=over
=item is_blacklisted ( $email )
=item is_blocklisted ( $email )
Says if the domain of the given email is blacklisted (C<domains_blacklist>
Says if the domain of the given email is blocklisted (C<domains_blocklist>
setting).
Returns 1 if it's blacklisted, 0 otherwise
Returns 1 if it's blocklisted, 0 otherwise
=back