summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/file.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index b26ebcf37..cb95edf0c 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -602,7 +602,7 @@ class File extends CI_Controller {
// TODO: this interface currently sets the same filename for every file if you use multiupload
$filename = $this->input->post("filename");
if ($filename !== false) {
- $filename = trim(base64_decode($filename, true), "\r\n\0\t\x0B");
+ $filename = base64_decode($filename, true);
}
// fall back if base64_decode failed
@@ -610,6 +610,8 @@ class File extends CI_Controller {
$filename = $file['name'];
}
+ $filename = trim($filename, "\r\n\0\t\x0B");
+
$folder = $this->mfile->folder($hash);
file_exists($folder) || mkdir ($folder);
$file_path = $this->mfile->file($hash);