[dev] Filetypes filter when reading a message

Michael M Slusarz slusarz at bigworm.colorado.edu
Tue Sep 30 11:53:22 PDT 2003


Quoting Nuno Loureiro <nuno at co.sapo.pt>:

| Hi!
|
| Here's a patch to filter some attachments by file extension when reading
| a message. This feature is similiar to one that exists in outlook. It
| uses a pref, so the user can configure which file extensions should be
| stripped when reading mail. The purpose of this is to increment a bit
| the security against virus and trojans for novice users.
|
| The patch was submitted by Victor Rodrigues <vitor at co.sapo.pt>

The function implementing it should definitely not be using private
variables from the MIME_Part class (e.g. _parts, _dispositionParameters). 
Also, the part should not be deleted from the MIME_Part object (with
unset(); instead the contents/content-type should be replaced by an
informational message explaining why the part is not being shown.  Simply
blasting away a part of the MIME structure of the message could have dire
consequences to how the message is parsed, not to mention that the user has
a right to know that something was attached to the message that they are
not being allowed to view directly.

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the dev mailing list