SA Bugzilla – Bug 7877
Regex rawbody __WORD_INVIS and __FONT_INVIS issues
Last modified: 2021-01-04 17:38:37 UTC
Hi, We have identified an issue with __WORD_INVIS and __FONT_INVIS regex on color: transparent. Due to this current regex, it also matches 'background-color:transparent', we are getting high spam score due to this 6 if both tags. rawbody __WORD_INVIS /<(?!style)[a-z]+\s[^>]{1,80}(?:font(?:-size)?\s*:\s*(?:0*[01](?:\.\d+)?(?:px|pt|Q|vw|vh|vmin)|0+(?:\.\d+)?(?:cm|mm|in|pc|em|ex|ch|rem|lh|vmax))\s*[;'a-z]|color\s*:\s*transparent\s*[;'])[^>]{0,80}>\w{1,20}</i rawbody __FONT_INVIS /<(?!style)[a-z]+\s[^>]{1,80}(?:font(?:-size)?\s*:\s*(?:0*[01](?:\.\d+)?(?:px|pt|Q|vw|vh|vmin)|0+(?:\.\d+)?(?:cm|mm|pc|ch|rem|lh|vmax|%)|0+(?:\.0\d*)(?:em|ex|in))(?:\s[a-z]|\s*[;'])|color\s*:\s*transparent\s*[;'])[^>]{0,80}>\w/i
Can you please attach a complete (all message headers intact) email that demonstrates this problem? Thanks.
Hi John, I cannot attach the complete email due to privacy. It can be easy reproduce using this example: <span style="background-color:transparent;font-family:Calibri;font-size:11pt;font-weight:normal;font-style:normal;">Test1</span></li></ul> <span style="background-color:transparent;font-family:Calibri;font-size:11pt;font-weight:normal;font-style:normal;">Test2</span></li></ul> <span style="background-color:transparent;font-family:Calibri;font-size:11pt;font-weight:normal;font-style:normal;">Test3</span></li></ul> <span style="background-color:transparent;font-family:Calibri;font-size:11pt;font-weight:normal;font-style:normal;">Test4</span></li></ul> <span style="background-color:transparent;font-family:Calibri;font-size:11pt;font-weight:normal;font-style:normal;">Test5</span></li></ul> <span style="background-color:transparent;font-family:Calibri;font-size:11pt;font-weight:normal;font-style:normal;">Test6</span></li></ul>
Sending svn/trunk/rulesrc/sandbox/jhardin/20_misc_testing.cf Transmitting file data .done Committing transaction... Committed revision 1885117.
Rule discrimination improved
Thanks for the quick fix. Have a nice day.