[horde] attachment corrupted when uploaded via webmail and firefox

Michael M Slusarz slusarz at horde.org
Tue Mar 23 20:43:58 UTC 2010


Quoting D G Teed <donald.teed at gmail.com>:

> I've researched this issue and tried various solutions
> alluded to within problem and bug reports.
>
> Most discussions refer back to this bug report
> surrounding the quoted-printable versus base64
> style of upload for buggy browsers.
>
> http://bugs.horde.org/ticket/?id=3565
>
> In that report, the bug reporter says there is
> a solution for them by disabling mime_magic
> and fileinfo modules in php and letting
> the reference to the mime.magic file in
> the conf do the trick.
>
> I've tried various combinations of this, restarting apache each time,
> and I always find the uploaded file is corrupted by webmail.
>
> The file extension we are dealing with is .dwg, used by some
> type of autocad software.  Students are attempting to submit
> their assignments to the Prof and the files are unusable.
> The only workaround is to zip the file first, and then this
> is transmitted OK.
>
> Here is what we've tried:
>
> update to most current packages from Redhat
> update Pear modules
> disable only fileinfo extension in php.ini
> disable only mime_magic.magicfile reference in php.ini
> disable both extensions
> use only $conf['mime']['magic_db'] = '/usr/share/file/magic.mime';  
> in conf.php
> disable both extensions and the conf.php line
>
> Regardless of what is done, the attachment is always messed up via
> the wrong sort of upload.  Does anyone have a method by which
> we can get things working with base64 uploads without changes
> to the browser end?

Not in IMP 4.  MIME magic isn't being used because the browser is  
reporting a valid, non-generic MIME type to IMP; we have no reason to  
not believe it isn't the MIME type that is being reported.  Your only  
solution is to hack the attachment upload code in IMP to catch this  
particular case and change the MIME type.

IMP 5 has a hook where admins can easily override a given MIME type  
when attaching a file.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list