HTML images are being removed FIXED - PATCH

Richard Frovarp richard.frovarp at sendit.nodak.edu
Mon Jun 23 15:42:20 IST 2008


Richard Frovarp wrote:
> Richard Frovarp wrote:
>> I'm having a problem where the img tag in HTML messages is being 
>> removed. I'm using clamd 0.92.1, SA 3.2.5, and MS 4.70-6.1. What is 
>> interesting is they aren't being replaced with anything, they're just 
>> being completely removed.
>>
>> I do have this set in MS, plus I would expect it to replace, not remove:
>> Allow WebBugs = yes
>>
>> Anyone have any ideas? I did switch to clamd from clamavmodule, so 
>> that may have something to do with it.
>>
>> Thanks,
>> Richard
> Okay, it's not clamd. I turned it off and I have the same problem. SA 
> shouldn't mess with, well anything. So it would appear that something 
> changed in MS between 4.61.7 and 4.70.6. I've got a diff between what 
> the MailScanner.conf file looked like before and after the upgrade. I 
> don't see anything in there that would explain this behavior.

I found the problem. If DisarmWebBug is false, it skips over adding 
$text to $output, making it completely skip the tag. Since I think the 
goal of the change is to track if the signature image is found, I stuck 
an else after the DisarmWebBug test to just dump the text.

--- Message.pm.bak      2008-06-23 09:30:21.000000000 -0500
+++ Message.pm  2008-06-23 09:36:56.000000000 -0500
@@ -6612,6 +6612,8 @@
       } else {
         $output .= $text;
       }
+    } else {
+      $output .= $text;
     }
   } elsif ($tagname eq 'base') {
     #print STDERR "It's a Base URL\n";



More information about the MailScanner mailing list