import spamassassin-3.4.4-4.el8

This commit is contained in:
CentOS Sources 2021-11-09 04:51:00 -05:00 committed by Stepan Oksanichenko
parent 0c036fae5d
commit 8f335eb304
2 changed files with 51 additions and 2 deletions

View File

@ -0,0 +1,45 @@
--- lib/Mail/SpamAssassin/Conf/Parser.pm (revision 1873634)
+++ lib/Mail/SpamAssassin/Conf/Parser.pm (working copy)
@@ -1244,9 +1244,9 @@
# no re "strict"; # since perl 5.21.8: Ranges of ASCII printables...
if ($text =~ /^exists:(.*)/) {
my $hdr = $1;
- # never evaled, so can be quite generous with the name
# check :addr etc header options
- if ($hdr !~ /^[^:\s]+:?$/) {
+ # $hdr used in eval text, validate carefully
+ if ($hdr !~ /^[\w.-]+:?$/) {
$self->lint_warn("config: invalid head test $name header: $hdr");
return;
}
@@ -1254,7 +1254,8 @@
$conf->{test_opt_header}->{$name} = $hdr;
$conf->{test_opt_exists}->{$name} = 1;
} else {
- if ($text !~ /^([^:\s]+(?:\:|(?:\:[a-z]+){1,2})?)\s*([=!]~)\s*(.+)$/) {
+ # $hdr used in eval text, validate carefully
+ if ($text !~ /^([\w.-]+(?:\:|(?:\:[a-z]+){1,2})?)\s*([=!]~)\s*(.+)$/) {
$self->lint_warn("config: invalid head test $name: $text");
return;
}
--- lib/Mail/SpamAssassin/Plugin/Check.pm (revision 1873634)
+++ lib/Mail/SpamAssassin/Plugin/Check.pm (working copy)
@@ -716,7 +716,7 @@
}
my $def = $conf->{test_opt_unset}->{$rulename};
- push(@{ $ordered{$hdrname . (!defined $def ? '' : "\t".$def)} },
+ push(@{ $ordered{$hdrname . (!defined $def ? '' : "\t$rulename")} },
$rulename);
return if ($opts{doing_user_rules} &&
@@ -740,7 +740,8 @@
my($hdrname, $def) = split(/\t/, $k, 2);
$self->push_evalstr_prefix($pms, '
$hval = $self->get(q{'.$hdrname.'}, ' .
- (!defined($def) ? 'undef' : 'q{'.$def.'}') . ');
+ (!defined($def) ? 'undef' :
+ '$self->{conf}->{test_opt_unset}->{q{'.$def.'}}') . ');
');
foreach my $rulename (@{$v}) {
my $tc_ref = $testcode{$rulename};

View File

@ -60,7 +60,7 @@ Summary: Spam filter for email which can be invoked from mail delivery agents
Name: spamassassin
Version: 3.4.4
#Release: 0.8.%%{prerev}%%{?dist}
Release: 3%{?dist}
Release: 4%{?dist}
License: ASL 2.0
Group: Applications/Internet
URL: https://spamassassin.apache.org/
@ -102,7 +102,7 @@ Patch5: spamassassin-disable_tests_for_deleted_modules.patch
# Patches 100+ are SVN backports (DO NOT REUSE!)
Patch100: spamassassin-cert_update.patch
Patch101: spamassassin-check_header.patch
# end of patches
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
@ -248,6 +248,7 @@ rm -f lib/Mail/SpamAssassin/Plugin/ResourceLimits.pm
# Patches 100+ are SVN backports (DO NOT REUSE!)
%patch100 -p1
%patch101 -p0
# end of patches
echo "RHEL=%{?rhel} FEDORA=%{?fedora}"
@ -434,6 +435,9 @@ exit 0
%endif
%changelog
* Thu Jul 29 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.4.4-4.el4
- Fix header parsing
* Tue Oct 6 2020 Pavel Zhukov <pzhukov@redhat.com> - 3.4.4-3
- Add tests BRs