https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8152

            Bug ID: 8152
           Summary: base href not handled properly
           Product: Spamassassin
           Version: 3.4.6
          Hardware: PC
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamassassin
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Created attachment 5894
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5894&action=edit
Email with bitly url using base href

The current code correctly computes the URL using the base href but it pushes
the wrong url.

The following change fixes the issue.

diff --git a/lib/Mail/SpamAssassin/HTML.pm b/lib/Mail/SpamAssassin/HTML.pm
index c3487a07e..380c8bc29 100644
--- a/lib/Mail/SpamAssassin/HTML.pm
+++ b/lib/Mail/SpamAssassin/HTML.pm
@@ -354,7 +354,7 @@ sub push_uri {
   my $target = target_uri($self->{base_href} || "", $uri);

   # skip things like <iframe src="" ...>
-  $self->{uri}->{$uri}->{types}->{$type} = 1  if $uri ne '';
+  $self->{uri}->{$target}->{types}->{$type} = 1  if $target ne '';
 }

 sub canon_uri {


Attaching a sample to reproduce the issue

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to