From bd8eeef99c49ac278d9c21e0304911715f7b1e35 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Mon, 26 Oct 2015 10:06:20 -0400 Subject: Fixed #5343 --- src/usr/local/www/exec.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/usr/local/www/exec.php') diff --git a/src/usr/local/www/exec.php b/src/usr/local/www/exec.php index 32510ef..038333d 100644 --- a/src/usr/local/www/exec.php +++ b/src/usr/local/www/exec.php @@ -71,7 +71,7 @@ $allowautocomplete = true; require("guiconfig.inc"); -if (($_POST['submit'] == gettext("Download")) && file_exists($_POST['dlPath'])) { +if (($_POST['submit'] == "DOWNLOAD") && file_exists($_POST['dlPath'])) { session_cache_limiter('public'); $fd = fopen($_POST['dlPath'], "rb"); header("Content-Type: application/octet-stream"); @@ -88,7 +88,7 @@ if (($_POST['submit'] == gettext("Download")) && file_exists($_POST['dlPath'])) fpassthru($fd); exit; -} else if (($_POST['submit'] == gettext("Upload")) && is_uploaded_file($_FILES['ulfile']['tmp_name'])) { +} else if (($_POST['submit'] == "UPLOAD") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) { move_uploaded_file($_FILES['ulfile']['tmp_name'], "/tmp/" . $_FILES['ulfile']['name']); $ulmsg = "Uploaded file to /tmp/" . htmlentities($_FILES['ulfile']['name']); unset($_POST['txtCommand']); @@ -246,9 +246,9 @@ if (!isBlank($_POST['txtCommand'])):?>

- " /> + - " onclick="return Reset_onClick( this.form );" /> + " onclick="return Reset_onClick( this.form );" /> @@ -257,7 +257,7 @@ if (!isBlank($_POST['txtCommand'])):?>


- " /> +
@@ -270,7 +270,7 @@ if (!isBlank($_POST['txtCommand'])):?>

- " /> +
@@ -283,6 +283,14 @@ if (!isBlank($_POST['txtCommand'])):?> echo eval($_POST['txtPHPCommand']); puts(" "); puts(""); +?> + +
-- cgit v1.1