summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2010-03-03 05:55:08 +0100
committerDerek Jones <derek.jones@ellislab.com>2010-03-03 05:55:08 +0100
commite12f64e70fad08c02668ab2fda00cd5d56b8116b (patch)
tree0a47665e06eac4d8b966bd9c577c996a10f49167 /system
parent5052e27db22d41c5d01c65d03ad515041def63a3 (diff)
updating Upload features and use of security library
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Upload.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 5ff478269..ac9323c08 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -454,6 +454,11 @@ class CI_Upload {
*/
function set_allowed_types($types)
{
+ if ( ! is_array($types) && $types == '*')
+ {
+ $this->allowed_types = '*';
+ return;
+ }
$this->allowed_types = explode('|', $types);
}
@@ -551,6 +556,11 @@ class CI_Upload {
*/
function is_allowed_filetype()
{
+ if ($this->allowed_types == '*')
+ {
+ return TRUE;
+ }
+
if (count($this->allowed_types) == 0 OR ! is_array($this->allowed_types))
{
$this->set_error('upload_no_file_types');
@@ -805,7 +815,7 @@ class CI_Upload {
}
$CI =& get_instance();
- $data = $CI->input->xss_clean($data);
+ $data = $CI->security->xss_clean($data);
flock($fp, LOCK_EX);
fwrite($fp, $data);