Skip to content

Commit

Permalink
Elide "; charset=binary" which can be returned from file::mime() from…
Browse files Browse the repository at this point in the history
… recent versions of finfo. See http://framework.zend.com/issues/browse/ZF-9383 for details.  Fixes ticket #1230.
  • Loading branch information
bharat committed Jul 20, 2010
1 parent b4b2ef9 commit 3136121
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/forge/libraries/Form_Upload.php
Expand Up @@ -135,6 +135,10 @@ public function rule_allow()
$mime = $this->upload['type'];
}

// Get rid of the ";charset=binary" that can occasionally occur and is
// legal via RFC2045
$mime = preg_replace('/; charset=binary/', '', $mime);

// Allow nothing by default
$allow = FALSE;

Expand Down

0 comments on commit 3136121

Please sign in to comment.