Return-Path: Delivered-To: apmail-spamassassin-commits-archive@www.apache.org Received: (qmail 45861 invoked from network); 9 Apr 2006 12:32:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Apr 2006 12:32:04 -0000 Received: (qmail 80383 invoked by uid 500); 9 Apr 2006 12:32:04 -0000 Delivered-To: apmail-spamassassin-commits-archive@spamassassin.apache.org Received: (qmail 80325 invoked by uid 500); 9 Apr 2006 12:32:03 -0000 Mailing-List: contact commits-help@spamassassin.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "SpamAssassin Dev" List-Id: Delivered-To: mailing list commits@spamassassin.apache.org Received: (qmail 80302 invoked by uid 99); 9 Apr 2006 12:32:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Apr 2006 05:32:03 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 09 Apr 2006 05:32:02 -0700 Received: (qmail 45645 invoked by uid 65534); 9 Apr 2006 12:31:42 -0000 Message-ID: <20060409123142.45586.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r392707 - /spamassassin/branches/3.1/lib/Mail/SpamAssassin/EvalTests.pm Date: Sun, 09 Apr 2006 12:31:38 -0000 To: commits@spamassassin.apache.org From: sidney@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: sidney Date: Sun Apr 9 05:31:35 2006 New Revision: 392707 URL: http://svn.apache.org/viewcvs?rev=392707&view=rev Log: bug 4829: deal with perl peculiarity with iterators when exiting early from a while each loop Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/EvalTests.pm Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/EvalTests.pm URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/EvalTests.pm?rev=392707&r1=392706&r2=392707&view=diff ============================================================================== --- spamassassin/branches/3.1/lib/Mail/SpamAssassin/EvalTests.pm (original) +++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/EvalTests.pm Sun Apr 9 05:31:35 2006 @@ -3103,7 +3103,10 @@ next if ($k !~ m%^https?:/*(?:[^\@/]+\@)?\d+\.\d+\.\d+\.\d+%i); foreach (@{$v->{anchor_text}}) { next if (m%^https:/*(?:[^\@/]+\@)?\d+\.\d+\.\d+\.\d+%i); - return 1 if (m%https:%i); + if (m%https:%i) { + keys %{$self->{html}->{uri_detail}}; # resets iterator, bug 4829 + return 1; + } } } @@ -3113,7 +3116,7 @@ sub check_iframe_src { my ($self) = @_; - while (my($k,$v) = each %{$self->{html}->{uri_detail}}) { + foreach my $v ( values %{$self->{html}->{uri_detail}} ) { return 1 if $v->{types}->{iframe}; }