spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sid...@apache.org
Subject svn commit: r392707 - /spamassassin/branches/3.1/lib/Mail/SpamAssassin/EvalTests.pm
Date Sun, 09 Apr 2006 12:31:38 GMT
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};
   }
 



Mime
View raw message