From 9bb004963b0ed205a01bfd7e09744263136d5b66 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 23 Dec 2011 12:28:44 -0500 Subject: [PATCH 1/2] Fix whitespace folder name --- files/ajax/newfolder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/ajax/newfolder.php b/files/ajax/newfolder.php index 6966e912c56..d244fb7be19 100644 --- a/files/ajax/newfolder.php +++ b/files/ajax/newfolder.php @@ -9,7 +9,7 @@ OC_JSON::checkLoggedIn(); $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; $foldername = isset( $_GET['foldername'] ) ? $_GET['foldername'] : ''; -if($foldername == '') { +if(trim($foldername) == '') { OC_JSON::error(array("data" => array( "message" => "Empty Foldername" ))); exit(); } From 1fe55b665609ad5af1c6b5af4f0b4fad9bede9f3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 23 Dec 2011 19:48:22 +0100 Subject: [PATCH 2/2] fix upload error reporting --- files/ajax/upload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/ajax/upload.php b/files/ajax/upload.php index 041ec0c92e3..5f0f68d9531 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -14,9 +14,10 @@ if (!isset($_FILES['files'])) { } foreach ($_FILES['files']['error'] as $error) { if ($error != 0) { + $l=new OC_L10N('files'); $errors = array( 0=>$l->t("There is no error, the file uploaded with success"), - 1=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini"), + 1=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'), 2=>$l->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"), 3=>$l->t("The uploaded file was only partially uploaded"), 4=>$l->t("No file was uploaded"),