[Mimedefang] BUG: filter_bad_filename doesn't expect a  space
    Kelson Vibber 
    kelson at speed.net
       
    Tue Mar  4 12:42:01 EST 2003
    
    
  
"Jay Levitt" <jay-defang at shopwatch.org> wrote:
>is there a way to craft a RE that will
>disallow the above because it's not quoted, but will allow a properly
>formed, quoted filename with a space in it?
AFAIK, by the time mimedefang-fitler gets ahold of the filename, it doesn't 
know whether it's been quoted or not.
What I do is, for a small set of "safe" filetypes (txt, jpg, pdf, etc.), 
use File::MMagic to check the actual type of the attachment and compare it 
against the declared type.  So if a file claims to be application/pdf, ends 
with .pdf, and File::MMagic concludes it's a PDF file, it will let it 
through despite the space.  I only run this on attachments of a few types, 
and then only if they've already tripped filter_bad_filename.
Kelson Vibber
SpeedGate Communications <www.speed.net> 
    
    
More information about the MIMEDefang
mailing list