Inline HTML Warning Bug

Berlakovich Felix (OeRK-W) Felix.Berlakovich at
Wed Mar 1 15:33:32 UTC 2017


I think I might have found a bug in the inline HTML warning code in the function "SignWarningMessage" in "". I was testing the attachment replacement and inline warning insertion with HTML mails. I noticed that mails created with Outlook had no inline warning inserted. Debugging into the code I found the reason on line 4601. The replacement regex tries to find the "<html>" starting tag, but Outlook additionally inserts a namespace, e.g

"<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="" xmlns="">"

Changing the regex fixes the problem:

<       $line =~ s/\<html\>/$&$warning/i;
>       $line =~ s/\<html(.*)\>/$&$warning/i;

However, I am not sure about possible consequences. Any recommendations?

Best regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the MailScanner mailing list