From c7b91976a972dddbc26c1762919d040a18126ccc Mon Sep 17 00:00:00 2001 From: phamt Date: Mon, 24 Oct 2011 00:15:24 +0000 Subject: [PATCH] Allow shell scripts to be uploaded. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10859 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/lib/upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-UI/lib/upload.php b/xCAT-UI/lib/upload.php index bd2c9b9d1..a0fd5b864 100644 --- a/xCAT-UI/lib/upload.php +++ b/xCAT-UI/lib/upload.php @@ -3,7 +3,7 @@ * Upload a given file into /var/tmp */ $type = $_FILES["file"]["type"]; -if ($type == "text/plain" || $type == "application/octet-stream") { +if ($type == "text/plain" || $type == "application/octet-stream" || $type == "application/x-shellscript") { $error = $_FILES["file"]["error"]; if ($error) { echo "Return Code: " . $error; @@ -24,6 +24,6 @@ if ($type == "text/plain" || $type == "application/octet-stream") { unlink($path); } } else { - echo "(Error) File type not supported"; + echo "(Error) File type $type not supported"; } ?> \ No newline at end of file