From 798a4824a2aa099de9eb05454ebb62b1522bee65 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 25 Jan 2012 15:23:52 +0100 Subject: strip base64 decoded file of special chars Signed-off-by: Florian Pritz --- application/controllers/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/controllers') diff --git a/application/controllers/file.php b/application/controllers/file.php index 4bb336ad0..f578dd7c7 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -237,7 +237,7 @@ class File extends CI_Controller { // work around a curl bug and allow the client to send the real filename base64 encoded $filename = $this->input->post("filename"); if ($filename !== false) { - $filename = base64_decode($filename, true); + $filename = trim(base64_decode($filename, true), "\r\n\0\t\x0B"); } // fall back if base64_decode failed -- cgit v1.2.3-24-g4f1b