67 |
+ # Migrate to use , as separator instead of : |
+ # Migrate to use , as separator instead of : |
68 |
+ if ($sbl !~ m/,/){ |
+ if ($sbl !~ m/,/){ |
69 |
+ my @zones = split /[:]/, $sbl; |
+ my @zones = split /[:]/, $sbl; |
70 |
+ my $fqdn_re = qr/[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/; |
+ my $fqdn_re = qr/([a-zA-Z0-9][a-zA-Z0-9-]{1,}[a-zA-Z0-9]\.)*[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}/; |
71 |
+ if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){ |
+ if (scalar @zones == 2 && $zones[1] !~ m/^$fqdn_re$/){ |
72 |
+ # When we have only two entries, check if the second one looks like a valid hostname |
+ # When we have only two entries, check if the second one looks like a valid hostname |
73 |
+ # so if you only have something like rhsbl.foo.net:Sorry you are blacklisted |
+ # so if you only have something like rhsbl.foo.net:Sorry you are blacklisted |