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 2018/10/28 09:41:27 UTC
svn commit: r1845003 -
/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
Author: hege
Date: Sun Oct 28 09:41:27 2018
New Revision: 1845003
URL: http://svn.apache.org/viewvc?rev=1845003&view=rev
Log:
Fix cond_cache key safer..
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm?rev=1845003&r1=1845002&r2=1845003&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm Sun Oct 28 09:41:27 2018
@@ -487,13 +487,13 @@ sub handle_conditional {
# If we have already successfully evaled the $value,
# just do what we would do then
- if (exists $self->{cond_cache}{$key.$value}) {
+ if (exists $self->{cond_cache}{"$key $value"}) {
push (@{$if_stack_ref}, {
type => 'if',
conditional => $value,
skip_parsing => $$skip_parsing_ref
});
- if ($self->{cond_cache}{$key.$value} == 0) {
+ if ($self->{cond_cache}{"$key $value"} == 0) {
$$skip_parsing_ref = 1;
}
return;
@@ -558,12 +558,12 @@ sub handle_conditional {
});
if (eval $eval) {
- $self->{cond_cache}{$key.$value} = 1;
+ $self->{cond_cache}{"$key $value"} = 1;
# leave $skip_parsing as-is; we may not be parsing anyway in this block.
# in other words, support nested 'if's and 'require_version's
} else {
warn "config: error in $key - $eval: $@" if $@ ne '';
- $self->{cond_cache}{$key.$value} = 0;
+ $self->{cond_cache}{"$key $value"} = 0;
$$skip_parsing_ref = 1;
}
}