From 31361219894bae6da9229fb140b7ebf2af45e46d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 20 Jul 2010 13:47:11 -0700 Subject: Elide "; charset=binary" which can be returned from file::mime() from recent versions of finfo. See http://framework.zend.com/issues/browse/ZF-9383 for details. Fixes ticket #1230. --- modules/forge/libraries/Form_Upload.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules') diff --git a/modules/forge/libraries/Form_Upload.php b/modules/forge/libraries/Form_Upload.php index da48764c..eda9c8a6 100644 --- a/modules/forge/libraries/Form_Upload.php +++ b/modules/forge/libraries/Form_Upload.php @@ -135,6 +135,10 @@ class Form_Upload_Core extends Form_Input { $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; -- cgit v1.2.3