[Mimedefang] Minor bug in bad extension handling

Philip Prindeville philipp_subx at redfish-solutions.com
Fri Nov 18 20:28:59 EST 2011

I set my list of bogus extensions to the empty string, but this had unexpected consequences.  We need the following patch:

     # - bad extensions (possibly with trailing dots) at end
     $re = '\.' . $bad_exts . '\.*$';

-    return 1 if (re_match($entity, $re));
+    return 1 if ($bad_exts ne '' && re_match($entity, $re));

     # Look inside ZIP files
     if (re_match($entity, '\.zip$') and

to /etc/mail/mimedefang-filter.

Otherwise, $re ends up being '\.\.*$' which would match a lone dot at the end.


More information about the MIMEDefang mailing list