summaryrefslogtreecommitdiff
path: root/modules/forge
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-07-20 13:47:11 -0700
committerBharat Mediratta <bharat@menalto.com>2010-07-20 13:47:11 -0700
commit31361219894bae6da9229fb140b7ebf2af45e46d (patch)
treefa1f64e6bd0fc856a9d1f0ae2eea1f4050927364 /modules/forge
parentb4b2ef92ae76e5dd612bbd6bb801e79a7ebfac98 (diff)
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.
Diffstat (limited to 'modules/forge')
-rw-r--r--modules/forge/libraries/Form_Upload.php4
1 files changed, 4 insertions, 0 deletions
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;