spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarti...@apache.org
Subject svn commit: r921471 - /spamassassin/branches/3.3/spamd/spamd.raw
Date Wed, 10 Mar 2010 17:40:54 GMT
Author: mmartinec
Date: Wed Mar 10 17:40:53 2010
New Revision: 921471

URL: http://svn.apache.org/viewvc?rev=921471&view=rev
Log:
Bug 6340, small updates according to offline correspondence
with Andrej Sossi, the original patch author

Modified:
    spamassassin/branches/3.3/spamd/spamd.raw

Modified: spamassassin/branches/3.3/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.3/spamd/spamd.raw?rev=921471&r1=921470&r2=921471&view=diff
==============================================================================
--- spamassassin/branches/3.3/spamd/spamd.raw (original)
+++ spamassassin/branches/3.3/spamd/spamd.raw Wed Mar 10 17:40:53 2010
@@ -2183,14 +2183,15 @@ sub handle_user_vpopmail {
     while (@aliases) {
       my $vpopusername_tainted = shift(@aliases);
       local $1;
-      if ($vpopusername_tainted =~ /.+ -> &?(.+)/) {
+      if ($vpopusername_tainted =~ /^.+ -> &?(.+)/) {
         $vpopusername = untaint_var($1);
-        if ($vpopusername =~ s{(/.+)/Maildir/}{$1}) {
+        if ($vpopusername =~ s{^(/.+)/Maildir/$}{$1}) {
           # this is the path to a real mailbox
           $userdir = $vpopusername;
-        } elsif ($vpopusername =~ /\@/) {
+        } elsif ($vpopusername !~ /^[#| \t]/ &&
+                 $vpopusername =~ /^[^@ \t]+\@[^@ \t]+\s*$/) {
           # this is a forward to another e-mail address
-          $vpopusername =~ s{.+ -> (.+)}{$1};
+          $vpopusername =~ s{^.+ -> (.+)}{$1};
           $vpopusername_tainted = `$vpopdir/bin/vuserinfo -d \Q$vpopusername\E`;
           if ($? == 0 && $vpopusername_tainted ne '') {
             $userdir = untaint_var($vpopusername_tainted);



Mime
View raw message