summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2010-04-22 14:34:09 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2010-04-22 14:34:09 +0200
commitdcae4490998dc111d265da11507c0dad660eb1b4 (patch)
treee9d90eb5b579382067a599d09b67364da0bc6726
parente4f6ee9b971d440d1f8cfee44e8860592475da0a (diff)
Some mime types are wrapped with " which breaks file type checking. This will remove any wrapping \ and "
-rw-r--r--system/libraries/Upload.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index b85663bcc..751044968 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -190,7 +190,7 @@ class CI_Upload {
$this->file_name = $this->_prep_filename($_FILES[$field]['name']);
$this->file_size = $_FILES[$field]['size'];
$this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']);
- $this->file_type = strtolower($this->file_type);
+ $this->file_type = trim(stripslashes($this->file_type), '"');
$this->file_ext = $this->get_extension($_FILES[$field]['name']);
// Convert the file size to kilobytes