You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2019/08/03 14:10:07 UTC
svn commit: r1864337 - in /spamassassin:
branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm
trunk/lib/Mail/SpamAssassin/Plugin/HashBL.pm
Author: hege
Date: Sat Aug 3 14:10:07 2019
New Revision: 1864337
URL: http://svn.apache.org/viewvc?rev=1864337&view=rev
Log:
Remove hashbl sha256 support, since DNS can't hand 64 character label, duh..
Modified:
spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm
spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/HashBL.pm
Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm?rev=1864337&r1=1864336&r2=1864337&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/HashBL.pm Sat Aug 3 14:10:07 2019
@@ -47,7 +47,6 @@ OPTS refers to multiple generic options:
raw do not hash data, query as is
md5 hash query with MD5
sha1 hash query with SHA1
- sha256 hash query with SHA256
case keep case before hashing, default is to lowercase
max=x maximum number of queries
shuffle if max exceeded, random shuffle queries before truncating to limit
@@ -120,7 +119,7 @@ use warnings;
my $VERSION = 0.101;
use Digest::MD5 qw(md5_hex);
-use Digest::SHA qw(sha1_hex sha256_hex);
+use Digest::SHA qw(sha1_hex);
use Mail::SpamAssassin::Plugin;
use Mail::SpamAssassin::Util qw(compile_regexp);
@@ -597,11 +596,9 @@ sub check_hashbl_bodyre {
sub _hash {
my ($self, $opts, $value) = @_;
- my $hashtype = $opts =~ /\b(raw|sha1|sha256|md5)\b/i ? lc($1) : 'sha1';
+ my $hashtype = $opts =~ /\b(raw|sha1|md5)\b/i ? lc($1) : 'sha1';
if ($hashtype eq 'sha1') {
return sha1_hex($value);
- } elsif ($hashtype eq 'sha256') {
- return sha256_hex($value);
} elsif ($hashtype eq 'md5') {
return md5_hex($value);
} else {
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/HashBL.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/HashBL.pm?rev=1864337&r1=1864336&r2=1864337&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/HashBL.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/HashBL.pm Sat Aug 3 14:10:07 2019
@@ -47,7 +47,6 @@ OPTS refers to multiple generic options:
raw do not hash data, query as is
md5 hash query with MD5
sha1 hash query with SHA1
- sha256 hash query with SHA256
case keep case before hashing, default is to lowercase
max=x maximum number of queries
shuffle if max exceeded, random shuffle queries before truncating to limit
@@ -121,7 +120,7 @@ use re 'taint';
my $VERSION = 0.101;
use Digest::MD5 qw(md5_hex);
-use Digest::SHA qw(sha1_hex sha256_hex);
+use Digest::SHA qw(sha1_hex);
use Mail::SpamAssassin::Plugin;
use Mail::SpamAssassin::Util qw(compile_regexp);
@@ -598,11 +597,9 @@ sub check_hashbl_bodyre {
sub _hash {
my ($self, $opts, $value) = @_;
- my $hashtype = $opts =~ /\b(raw|sha1|sha256|md5)\b/i ? lc($1) : 'sha1';
+ my $hashtype = $opts =~ /\b(raw|sha1|md5)\b/i ? lc($1) : 'sha1';
if ($hashtype eq 'sha1') {
return sha1_hex($value);
- } elsif ($hashtype eq 'sha256') {
- return sha256_hex($value);
} elsif ($hashtype eq 'md5') {
return md5_hex($value);
} else {