In this version, mime_content_type as a fallback to text/plain instead of
application/octet-stream, leading to invalid email attachments (Closes #802).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
- Unsure mails are moderated -FRU
* Forums:
- - Ban system -THD
-
+ - Ban system -THD
+
Bug/Wish:
* Emails:
- #726: Don't send the email if an attachment can't be downloaded -FRU
- #750: Fix email list in test email -FRU
+ - #802: Fix upload content type checking on some buggy PHP -FRU
* Lists:
- #793: Show broken members on ML -FRU
{
if ($this->exists()) {
$this->type = trim(mime_content_type($this->filename));
+ if ($this->type == 'text/plain') { // Workaround a bug of php 5.2.0+etch10 (mime_content_type fallback is 'text/plain')
+ $this->type = trim(exec("file -bi " . escapeshellarg($this->filename)));
+ }
}
}